Compare commits

...

12 Commits

Author SHA1 Message Date
moodler e8fb94a3cd Label this as Moodle 1.3.1 2004-06-04 07:55:19 +00:00
moodler 79dd6106dd Removed PHP_SELF ... bug 1522 2004-06-03 14:22:20 +00:00
moodler 031dd5f017 OK, for bug fixes this is a pretty big checkin!! :-/
I finally was able to see the HTML Editor bug in IE/XP that everyone
was talking about, and it's a very serious bug as it makes Moodle 1.3
almost unusable for these people.  :-(  :-(

So, I eventually found out that the problem is that the Javascript that
attaches the editor has troubles when it is embedded within the table                                                   that course/mod.php puts around the mod.html forms in each module.
(Only in IE and only sometimes, mind you).

While testing I also had a good look at a long standing issue which is the
inconsistency of the mod.html forms when using the editor.

So, to fix both I decided to put the HTML editor calls OUTSIDE the mod.html
in the mod.php file.  This means that all modules get the HTML editor by default
on all text areas during activity module setup by default.

I've been running through this for the past few hours and it seems
pretty stable now and a lot more consistent, so I'm checking it in
as big fix towards the Moodle 1.3.1 we have to have.

Unfortunately it also means the API has changed a bit  ... I had to
update all the module dependencies to this exact version (or later).

Please test this "stable" version hard using the standard modules only
and I'll merge these changes over to the trunk in a day or so and update
all known third-party modules.
2004-06-03 13:07:49 +00:00
moodler 507ee65e59 Fix for bug 1070 where HTML editor body was not always being shown. 2004-06-03 08:14:07 +00:00
defacer 56b19c309e Fix for an (apparently old but only recently discovered by me) issue from the
forums where require_once() would fail to do the "once" part unless you use
absolute pathnames.
2004-06-02 08:03:05 +00:00
stronk7 99dac04aeb Solved bug 1491 in all the "linking" filters.
(http://moodle.org/bugs/bug.php?op=show&bugid=1491)
Bugfix 001
2004-05-30 00:28:52 +00:00
gustav_delius 12f18ea1ab A hack to fix bug 1488. html editor needs $course object defined. Should perhaps be solved differently in the long run. 2004-05-29 16:19:32 +00:00
stronk7 1626376373 One simple change to test cvs branching... 2004-05-29 15:19:15 +00:00
moodler 7729acff90 On second thoughts, we must not touch the version date,
so that people can upgrade properly to Moodle 1.4 later.
2004-05-29 14:27:33 +00:00
moodler b35cd9c592 Update version number for stable. No need to merge this obviously 2004-05-29 14:25:39 +00:00
gustav_delius a69a278684 previous fix now also works in weekly format 2004-05-29 09:12:33 +00:00
gustav_delius 61cc70ae45 section links now preserve focused view, see http://moodle.org/mod/forum/discuss.php?d=7648#37555 2004-05-29 08:40:41 +00:00
1332 changed files with 60397 additions and 106195 deletions
+1 -6
View File
@@ -105,7 +105,7 @@
/// Get and sort the existing blocks
if (false === ($blocks = get_records('blocks'))) {
if (!$blocks = get_records('blocks')) {
error('No blocks found!'); // Should never happen
}
@@ -117,11 +117,6 @@
$blockbyname[$blockobject->get_title()] = $block->id;
$blockobjects[$block->id] = $blockobject;
}
if(empty($blockbyname)) {
error('One or more blocks are registered in the database, but they all failed to load!');
}
ksort($blockbyname);
/// Print the table of all blocks
+87 -175
View File
@@ -2,8 +2,8 @@
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td align=right><p>lang:</td>
<td>
<td align=right><p>lang:</td>
<td>
<?php choose_from_menu (get_list_of_languages(), "lang", $config->lang, "", "", ""); ?>
</td>
<td>
@@ -11,9 +11,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>langmenu:</td>
<td>
<?php
<td align=right><p>langmenu:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
@@ -26,8 +26,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>langlist:</td>
<td>
<td align=right><p>langlist:</td>
<td>
<input name=langlist type=text size=40 value="<?php p($config->langlist) ?>">
</td>
<td>
@@ -35,8 +35,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>locale:</td>
<td>
<td align=right><p>locale:</td>
<td>
<input name=locale type=text size=10 value="<?php p($config->locale) ?>">
</td>
<td>
@@ -44,7 +44,7 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>timezone:</td>
<td align=right><p>timezone:</td>
<td><?php
if (abs($config->timezone) > 13) {
$config->timezone = 99;
@@ -71,16 +71,16 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>country:</td>
<td><?php choose_from_menu (get_list_of_countries(), "country", $config->country, get_string("selectacountry"), "") ?>
</td>
<td align=right><p>country:</td>
<td><?php choose_from_menu (get_list_of_countries(), "country", $config->country, get_string("selectacountry"), "") ?>
</td>
<td>
<?php print_string("configcountry") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>smtphosts:</td>
<td>
<td align=right><p>smtphosts:</td>
<td>
<input name=smtphosts type=text size=30 value="<?php p($config->smtphosts)?>">
</td>
<td>
@@ -88,8 +88,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>smtpuser:</td>
<td>
<td align=right><p>smtpuser:</td>
<td>
<input name=smtpuser type=text size=10 value="<?php p($config->smtpuser)?>">
</td>
<td rowspan=2>
@@ -97,24 +97,15 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>smtppass:</td>
<td>
<td align=right><p>smtppass:</td>
<td>
<input name=smtppass type=text size=10 value="<?php p($config->smtppass)?>">
</td>
</tr>
</TR>
<tr valign=top>
<td align=right><p>noreplyaddress:</td>
<td>
<input name=noreplyaddress type=text size=30 value="<?php p($config->noreplyaddress)?>">
</td>
<td>
<?php print_string("confignoreplyaddress") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>gdversion:</td>
<td>
<?php
<td align=right><p>gdversion:</td>
<td>
<?php
unset($options);
$options[0] = get_string("gdnot");
$options[1] = get_string("gd1");
@@ -132,7 +123,7 @@
<tr valign=top>
<td align=right><p>htmleditor:</td>
<td>
<?php
<?php
unset($options);
$options[0] = get_string("allownot");
$options[1] = get_string("allow");
@@ -144,9 +135,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>maxeditingtime:</td>
<td>
<?php
<td align=right><p>maxeditingtime:</td>
<td>
<?php
unset($options);
$options[3600] = get_string("numminutes", "", 60);
$options[2700] = get_string("numminutes", "", 45);
@@ -163,9 +154,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>longtimenosee:</td>
<td>
<?php
<td align=right><p>longtimenosee:</td>
<td>
<?php
unset($options);
$options[1000] = get_string("numdays", "", 1000);
$options[365] = get_string("numdays", "", 365);
@@ -187,9 +178,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>deleteunconfirmed:</td>
<td>
<?php
<td align=right><p>deleteunconfirmed:</td>
<td>
<?php
unset($options);
$options[0] = get_string("never");
$options[168] = get_string("numdays", "", 7);
@@ -211,9 +202,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>loglifetime:</td>
<td>
<?php
<td align=right><p>loglifetime:</td>
<td>
<?php
unset($options);
$options[0] = get_string("neverdeletelogs");
$options[1000] = get_string("numdays", "", 1000);
@@ -232,56 +223,10 @@
<?php print_string("configloglifetime") ?>
</td>
</tr>
<tr valign="top">
<td align="right"><p>displayloginfailures:</p></td>
<td>
<?php
unset($options);
$options[''] = get_string('nobody');
$options['admin'] = get_string('administrators');
$options['teacher'] = get_string('administratorsandteachers');
$options['everybody'] = get_string('everybody');
choose_from_menu($options, "displayloginfailures",$config->displayloginfailures,"","","");
?>
</td>
<td>
<?php print_string("configdisplayloginfailures") ?>
</td>
</tr>
<tr valign="top">
<td align="right"><p>notifyloginfailures:</p></td>
<td>
<?php
unset($options);
$options[''] = get_string('nobody');
$options['mainadmin'] = get_string('administrator');
$options['alladmins'] = get_string('administratorsall');
choose_from_menu($options,"notifyloginfailures",$config->notifyloginfailures,"","","");
?>
</td>
<td>
<?php print_string('confignotifyloginfailures') ?>
</td>
</tr>
<tr valign="top">
<td align="right"><p>notifyloginthreshold:</p></td>
<td>
<?php
unset($options);
for ($i=1; $i<=100; $i++) {
$options[$i] = "$i";
}
choose_from_menu($options,"notifyloginthreshold",$config->notifyloginthreshold,"","","");
?>
</td>
<td>
<?php print_string('confignotifyloginthreshold') ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>sessiontimeout:</td>
<td>
<?php
<td align=right><p>sessiontimeout:</td>
<td>
<?php
unset($options);
$options[14400] = get_string("numhours", "", 4);
$options[10800] = get_string("numhours", "", 3);
@@ -301,8 +246,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>sessioncookie:</td>
<td>
<td align=right><p>sessioncookie:</td>
<td>
<input name=sessioncookie type=text size=10 value="<?php p($config->sessioncookie)?>">
</td>
<td>
@@ -310,8 +255,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>zip:</td>
<td>
<td align=right><p>zip:</td>
<td>
<input name=zip type=text size=30 value="<?php p($config->zip) ?>">
</td>
<td>
@@ -319,8 +264,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>unzip:</td>
<td>
<td align=right><p>unzip:</td>
<td>
<input name=unzip type=text size=30 value="<?php p($config->unzip) ?>">
</td>
<td>
@@ -328,8 +273,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>slasharguments:</td>
<td>
<td align=right><p>slasharguments:</td>
<td>
<?php unset($options);
$options[0] = "file.php?file=/pic.jpg";
$options[1] = "file.php/pic.jpg";
@@ -342,8 +287,8 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>proxyhost:</td>
<td>
<td align=right><p>proxyhost:</td>
<td>
<input name=proxyhost type=text size=30 value="<?php p($config->proxyhost) ?>">
</td>
<td rowspan=2>
@@ -351,15 +296,15 @@
</td>
</TR>
<tr valign=top>
<td align=right><p>proxyport:</td>
<td>
<td align=right><p>proxyport:</td>
<td>
<input name=proxyport type=text size=5 value="<?php p($config->proxyport) ?>">
</td>
</tr>
<tr valign=top>
<td align=right><p>debug:</td>
<td>
<?php
<td align=right><p>debug:</td>
<td>
<?php
unset($options);
$options[7] = get_string("no");
$options[15] = get_string("yes");
@@ -372,9 +317,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>framename:</td>
<td>
<?php
<td align=right><p>framename:</td>
<td>
<?php
if (empty($config->framename)) {
$config->framename = "_top";
}
@@ -386,9 +331,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>secureforms:</td>
<td>
<?php
<td align=right><p>secureforms:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
@@ -401,9 +346,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>teacherassignteachers:</td>
<td>
<?php
<td align=right><p>teacherassignteachers:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
@@ -416,9 +361,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>allowunenroll:</td>
<td>
<?php
<td align=right><p>allowunenroll:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
@@ -431,9 +376,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>maxbytes:</td>
<td>
<?php
<td align=right><p>maxbytes:</td>
<td>
<?php
$options = get_max_upload_sizes();
choose_from_menu ($options, "maxbytes", $config->maxbytes, "");
?>
@@ -443,9 +388,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>fullnamedisplay:</td>
<td>
<?php
<td align=right><p>fullnamedisplay:</td>
<td>
<?php
unset($options);
$options['language'] = get_string('language');
$options['firstname lastname'] = get_string('firstname') . ' + ' . get_string('lastname');
@@ -460,9 +405,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>extendedusernamechars:</td>
<td>
<?php
<td align=right><p>extendedusernamechars:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
@@ -475,24 +420,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>autologinguests:</td>
<td>
<?php
unset($options);
$options[0] = get_string('no');
$options[1] = get_string('yes');
choose_from_menu ($options, "autologinguests", $config->autologinguests, "", "", "");
?>
</td>
<td>
<?php print_string("configautologinguests") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>forcelogin:</td>
<td>
<?php
<td align=right><p>forcelogin:</td>
<td>
<?php
unset($options);
$options[0] = get_string('no');
$options[1] = get_string('yes');
@@ -505,9 +435,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>forceloginforprofiles:</td>
<td>
<?php
<td align=right><p>forceloginforprofiles:</td>
<td>
<?php
unset($options);
$options[0] = get_string('no');
$options[1] = get_string('yes');
@@ -520,9 +450,9 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>opentogoogle:</td>
<td>
<?php
<td align=right><p>opentogoogle:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
@@ -547,37 +477,19 @@
?>
</td>
<td>
<?php
<?php
print_string("configenablerssfeeds");
//Check for required functions...
if(!function_exists('utf8_encode')) {
echo "<font color=\"red\"> You need to add XML support to your PHP installation.</font>";
}
?>
</td>
</tr>
<tr valign=top>
<td align=right><p>digestmailtime:</td>
<td>
<?php
$hours = array();
for ($i=0; $i<=23; $i++) {
$hours[$i] = sprintf("%02d",$i);
}
choose_from_menu($hours, 'digestmailtime', $config->digestmailtime, "");
?>
</td>
<td>
<?php
print_string('configdigestmailtime');
}
?>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>
+1 -18
View File
@@ -117,12 +117,7 @@
$cachelifetime = time() - $CFG->cachetext;
delete_records_select("cache_text", "timemodified < '$cachelifetime'");
}
if (!empty($CFG->notifyloginfailures)) {
notify_login_failures();
}
} // End of occasional clean-up tasks
}
if (file_exists("$CFG->dataroot/cronextra.php")) {
include("$CFG->dataroot/cronextra.php");
@@ -166,18 +161,6 @@
}
}
/// Run the enrolment cron, if any
require_once("$CFG->dirroot/enrol/$CFG->enrol/enrol.php");
$enrol = new enrolment_plugin();
$enrol->cron();
if (!empty($enrol->log)) {
echo $enrol->log;
}
//Unset session variables and destroy it
@session_unset();
@session_destroy();
echo "Cron script completed correctly\n";
$difftime = microtime_diff($starttime, microtime());
-75
View File
@@ -1,75 +0,0 @@
<?PHP // $Id$
// enrol.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.
include("../config.php");
require_login();
if (!$site = get_site()) {
redirect("index.php");
}
if (!isadmin()) {
error("Only the admin can use this page");
}
if (isset($_GET['enrolment'])) {
$enrolname = $_GET['enrol'];
} else {
$enrolname = $CFG->enrol;
}
require_once("$CFG->dirroot/enrol/$enrolname/enrol.php"); /// Open the class
$enrolment = new enrolment_plugin();
/// If data submitted, then process and store.
if ($config = data_submitted()) {
if ($enrolment->process_config($config)) {
redirect("enrol.php", get_string("changessaved"), 1);
}
}
/// Otherwise fill and print the form.
$str = get_strings(array('enrolments', 'users', 'administration'));
if (empty($config)) {
$page->config = $CFG;
} else {
$page->config = $config;
}
$modules = get_list_of_plugins("enrol");
foreach ($modules as $module) {
$page->options[$module] = get_string("enrolname", "enrol_$module");
}
asort($page->options);
$form = $enrolment->config_form($page);
print_header("$site->shortname: $str->enrolments", "$site->fullname",
"<a href=\"index.php\">$str->administration</a> ->
<a href=\"users.php\">$str->users</a> -> $str->enrolments");
print_heading($page->options[$CFG->enrol]);
echo "<CENTER><P><B>";
echo "NOT COMPLETE";
echo "<P><B>";
echo "<form TARGET=\"{$CFG->framename}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">";
print_string("chooseauthmethod","auth");
choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
echo "</B></P></CENTER>";
print_footer();
exit;
?>
-1
View File
@@ -10,7 +10,6 @@
optional_variable($up);
optional_variable($down);
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
+30 -32
View File
@@ -122,26 +122,6 @@
die;
}
/// Insert default values for any important configuration variables
include_once("$CFG->dirroot/lib/defaults.php");
foreach ($defaults as $name => $value) {
if (!isset($CFG->$name)) {
$CFG->$name = $value;
set_config($name, $value);
$configchange = true;
}
}
/// If any new configurations were found then send to the config page to check
if (!empty($configchange)) {
redirect("config.php");
}
/// Check version of Moodle code on disk compared with database
/// and upgrade if possible.
@@ -332,6 +312,25 @@
}
/// Insert default values for any important configuration variables
include_once("$CFG->dirroot/lib/defaults.php");
foreach ($defaults as $name => $value) {
if (!isset($CFG->$name)) {
$CFG->$name = $value;
set_config($name, $value);
$configchange = true;
}
}
/// If any new configurations were found then send to the config page to check
if (!empty($configchange)) {
redirect("config.php");
}
/// Set up the overall site name etc.
if (! $site = get_site()) {
redirect("site.php");
@@ -395,8 +394,7 @@
$userdata = "<font size=+1>&nbsp;</font><a href=\"auth.php\">".get_string("authentication")."</a> - <font size=1>".
get_string("adminhelpauthentication")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"user.php\">".get_string("edituser")."</a> - <font size=1>".
get_string("adminhelpedituser")."</font><br />";
if (is_internal_auth()) {
$userdata .= "<font size=+1>&nbsp;</font><a href=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".
get_string("addnewuser")."</a> - <font size=1>".
@@ -405,19 +403,17 @@
get_string("uploadusers")."</a> - <font size=1>".
get_string("adminhelpuploadusers")."</font><br />";
}
$userdata .= "<hr><font size=+1>&nbsp;</font><a href=\"enrol.php\">".get_string("enrolments")."</a> - <font size=1>".
get_string("adminhelpenrolments")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"../course/index.php?edit=off\">".get_string("assignstudents")."</a> - <font size=1>".
get_string("adminhelpassignstudents")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"user.php\">".get_string("edituser")."</a> - <font size=1>".
get_string("adminhelpedituser")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"admin.php\">".get_string("assignadmins")."</a> - <font size=1>".
get_string("adminhelpassignadmins")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"creators.php\">".get_string("assigncreators")."</a> - <font size=1>".
get_string("adminhelpassigncreators")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"../course/index.php?edit=on\">".get_string("assignteachers")."</a> - <font size=1>".
get_string("adminhelpassignteachers").
" <img src=\"../pix/t/user.gif\" height=11 width=11></font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"creators.php\">".get_string("assigncreators")."</a> - <font size=1>".
get_string("adminhelpassigncreators")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"admin.php\">".get_string("assignadmins")."</a> - <font size=1>".
get_string("adminhelpassignadmins")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"../course/index.php?edit=off\">".get_string("assignstudents")."</a> - <font size=1>".
get_string("adminhelpassignstudents")."</font>";
$table->data[] = array("<font size=+1><b><a href=\"users.php\">".get_string("users")."</a></b>", $userdata);
@@ -463,3 +459,5 @@
print_footer($site);
?>
+16 -25
View File
@@ -27,21 +27,14 @@
case "missing":
$navigation = "<A HREF=\"lang.php\">$strlanguage</A> -> $strmissingstrings";
$title = $strmissingstrings;
$button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/admin/lang.php">'.
'<input type="hidden" name="mode" value="compare" />'.
'<input type="submit" value="'.$strcomparelanguage.'" /></form>';
break;
case "compare":
$navigation = "<A HREF=\"lang.php\">$strlanguage</A> -> $strcomparelanguage";
$title = $strcomparelanguage;
$button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/admin/lang.php">'.
'<input type="hidden" name="mode" value="missing" />'.
'<input type="submit" value="'.$strmissingstrings.'" /></form>';
break;
default:
$title = $strlanguage;
$navigation = $strlanguage;
$button = '';
break;
}
@@ -49,8 +42,7 @@
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $navigation",
'', '', true, $button);
"<a href=\"configure.php\">$strconfiguration</a> -> $navigation");
if (!$mode) {
$currlang = current_language();
@@ -110,18 +102,15 @@
$value = str_replace("$"."a", "\\$"."a", $value);
$value = str_replace("%%","%",$value);
if ($first) {
echo "<p><b>".get_string("stringsnotset","","$langdir/$file")."</b></p><pre>";
echo "</PRE><HR><P><B>".get_string("stringsnotset","","$langdir/$file")."</B></P><PRE>";
$first = false;
$somethingfound = true;
}
echo "$"."string['$key'] = \"$value\";<br />";
echo "$"."string['$key'] = \"$value\";<BR>";
}
}
if (!$first) {
echo '</pre><hr />';
}
}
if (! $files = get_directory_list("$CFG->dirroot/lang/en/help", "CVS")) {
error("Could not find English language help files!");
}
@@ -216,24 +205,26 @@
$envalue = str_replace("%%","%",$envalue);
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "\n\n<tr>";
echo "<td dir=ltr lang=en width=20% bgcolor=\"$THEME->cellheading\" nowrap valign=top>$key</td>\n";
echo "<td dir=ltr lang=en width=40% bgcolor=\"$THEME->cellheading\" valign=top>$envalue</td>\n";
echo "<tr>";
echo "<td dir=ltr lang=en width=20% bgcolor=\"$THEME->cellheading\" nowrap valign=top>$key</td>";
echo "<td dir=ltr lang=en width=40% bgcolor=\"$THEME->cellheading\" valign=top>$envalue</td>";
$value = $string[$key];
$value = str_replace("\r","",$value); // Bad character caused by Windows
$value = preg_replace("/\n{3,}/", "\n\n", $value); // Collapse runs of blank lines
$value = trim($value, "\n"); // Delete leading/trailing lines
$value = str_replace("\n\n\n\n\n\n","\n",$value); // Collapse runs of blank lines
$value = str_replace("\n\n\n\n\n","\n",$value);
$value = str_replace("\n\n\n\n","\n",$value);
$value = str_replace("\n\n\n","\n",$value);
$value = str_replace("\n\n\n","\n",$value);
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
$cellcolour = $value ? $THEME->cellcontent: $THEME->highlight;
if ($editable) {
echo "<td width=40% bgcolor=\"$cellcolour\" valign=top>\n";
echo "<td width=40% bgcolor=\"$cellcolour\" valign=top>";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
@@ -242,17 +233,17 @@
$cols=50;
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
echo "<textarea name=\"string-$key\" cols=\"$cols\" rows=\"$rows\">$value</textarea>\n";
echo "<textarea name=\"string-$key\" cols=\"$cols\" rows=\"$rows\">$value</textarea>";
} else {
if ($valuelen) {
$cols = $valuelen + 2;
}
echo "<input type=\"text\" name=\"string-$key\" value=\"$value\" size=\"$cols\"></td>";
}
echo "</TD>\n";
echo "</TD>";
} else {
echo "<td width=40% bgcolor=\"$cellcolour\" valign=top>$value</td>\n";
echo "<td width=40% bgcolor=\"$cellcolour\" valign=top>$value</td>";
}
}
if ($editable) {
-2
View File
@@ -9,8 +9,6 @@
optional_variable($delete);
optional_variable($confirm);
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
+18 -28
View File
@@ -2,13 +2,13 @@
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td align=right><P><?php print_string("fullsitename") ?>:</td>
<td><input type="text" name="fullname" size="50" maxlength="254" value="<?php p($form->fullname) ?>">
<td><input type="text" name="fullname" size=50 value="<?php p($form->fullname) ?>">
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
<tr valign=top>
<td align=right><P><?php print_string("shortsitename") ?>:</td>
<td><input type="text" name="shortname" size="15" maxlength="15" value="<?php p($form->shortname) ?>">
<td><input type="text" name="shortname" size=50 value="<?php p($form->shortname) ?>">
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
@@ -66,42 +66,32 @@
</td>
</tr>
<tr valign=top>
<td align="right"><P><?php print_string("sitesection") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "numsections", $form->numsections, "");
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" maxlength="100" size="25" value="<?php p($form->teacher) ?>">
(<?php print_string("wordforteachereg") ?>)
<td align=right><p><?php print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" maxlength="100" size=25 value="<?php p($form->teacher) ?>">
(<?php print_string("wordforteachereg") ?>)
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforteachers") ?>:</td>
<td><input type="text" name="teachers" maxlength="100" size="25" value="<?php p($form->teachers) ?>">
(<?php print_string("wordforteacherseg") ?>)
<td align=right><p><?php print_string("wordforteachers") ?>:</td>
<td><input type="text" name="teachers" maxlength="100" size=25 value="<?php p($form->teachers) ?>">
(<?php print_string("wordforteacherseg") ?>)
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforstudent") ?>:</td>
<td><input type="text" name="student" maxlength="100" size="25" value="<?php p($form->student) ?>">
(<?php print_string("wordforstudenteg") ?>)
<td align=right><p><?php print_string("wordforstudent") ?>:</td>
<td><input type="text" name="student" maxlength="100" size=25 value="<?php p($form->student) ?>">
(<?php print_string("wordforstudenteg") ?>)
<?php if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforstudents") ?>:</td>
<td><input type="text" name="students" maxlength="100" size="25" value="<?php p($form->students) ?>">
(<?php print_string("wordforstudentseg") ?>)
<td align=right><p><?php print_string("wordforstudents") ?>:</td>
<td><input type="text" name="students" maxlength="100" size=25 value="<?php p($form->students) ?>">
(<?php print_string("wordforstudentseg") ?>)
<?php if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</td>
</tr>
<tr>
<td></td>
-7
View File
@@ -3,7 +3,6 @@
require_once("../config.php");
if ($site = get_site()) {
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
@@ -29,11 +28,6 @@
error("Serious Error! Could not update the site record! (id = $form->id)");
}
} else {
// [pj] We are about to create the site, so let's add some blocks...
// calendar_month is included as a Moodle feature advertisement ;-)
require_once('../lib/blocklib.php');
$form->blockinfo = blocks_get_default_blocks(NULL, 'site_main_menu,admin,course_list:course_summary,calendar_month');
if ($newid = insert_record("course", $form)) {
$cat->name = get_string("miscellaneous");
if (insert_record("course_categories", $cat)) {
@@ -65,7 +59,6 @@
$form->shortname = "";
$form->summary = "";
$form->newsitems = 3;
$form->numsections = 0;
$form->id = "";
$form->category = 0;
$form->format = "social";
+4 -7
View File
@@ -181,11 +181,11 @@
$columndir = "ASC";
}
} else {
$columndir = $dir == "ASC" ? "DESC":"ASC";
$columndir = $dir == "asc" ? "desc":"asc";
if ($column == "lastaccess") {
$columnicon = $dir == "ASC" ? "up":"down";
$columnicon = $dir == "asc" ? "up":"down";
} else {
$columnicon = $dir == "ASC" ? "down":"up";
$columnicon = $dir == "asc" ? "down":"up";
}
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" />";
@@ -331,9 +331,6 @@
}
echo "</form>";
echo "</td></tr></table>";
if (is_internal_auth()){
print_heading("<a href=\"user.php?newuser=true\">".get_string("addnewuser")."</a>");
}
print_table($table);
@@ -343,7 +340,7 @@
}
if (is_internal_auth()){
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
print_heading("<a href=\"user.php?newuser=true\">".get_string("addnewuser")."</a>");
}
-71
View File
@@ -1,71 +0,0 @@
Moodle - FirstClass authentication module
-----------------------------------------
This module uses the FirstClass Flexible Provisining Protocol (FPP) to communicate between the FirstClass server
and the Moodle host.
Installation
------------
1. Enable FPP on the FirstClass server
FPP is not doumented in the FirstClass documentation and is not enable by default.
To enable the protocol you need to edit the file \FCPO\Server\Netinfo. Open the file and insert the
following lines.
// TCP port for Flexible Provisioning Protocol (FPP).
TCPFPPPORT = 3333
2. Create an account on the FirstClass server with privilege "Subadministrator".
Using the FPP protocoll this module logs in to the FirstClass server and issuess batch admin commands.
Batch admin command can only be issued in the context of a user with subadministrative privileges.
Default account name is "fcMoodle".
3. Check that the FPP protocoll is working by running a Telnet session. If everyting is working you
should get a "+0" answer from the server.
> telnet yourhost.domain.com 3333
+0
Check that the "fcMoodle" is working by entering the following sequens of commands:
> telnet yourhost.domain.com 3333
+0
fcMoodle
+0
the_password_you_gave_fcmoodle
+0
Get user some_user_id 1201
1201 0 some_user_id
+0
4. On the Moodle host go to the directory where you have installed Moodle.
Open the folder "auth", where all other authentication modules are installed,
and create a new directory with the name "fc".
Copy the files "config.html", "fcFPP.php" and "lib.php" to the "auth" directory.
Now you need to add som strings to the language file. This distribution contains
string for the English (en) and Swedish (sv) translation.
Open the file "auth.php" in the folder "lang/sv" and paste the text from the file
"auth.php - sv.txt" at the end of the file above the line "?>"
Open the file "auth.php" in the folder "lang/en" and paste the text from the file
"auth.php - en.txt" at the end of the file above the line "?>"
-84
View File
@@ -1,84 +0,0 @@
<?PHP
if (!isset($config->auth_fchost)) {
$config->auth_fchost = "127.0.0.1";
}
if (!isset($config->auth_fcfppport)) {
$config->auth_fcfppport = "3333";
}
if (!isset($config->auth_fcuserid)) {
$config->auth_fcuserid = "fcMoodle";
}
if (!isset($config->auth_fcpasswd)) {
$config->auth_fcpasswd = "";
}
if (!isset($config->auth_fccreators)) {
$config->auth_fccreators = "";
}
?>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fchost:</TD>
<TD>
<INPUT name=auth_fchost TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fchost?>">
<?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
</TD>
<TD>
<?php print_string("auth_fchost","auth") ?>
</TD>
</TR>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fcfppport:</TD>
<TD>
<INPUT name=auth_fcfppport TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fcfppport?>">
<?php if (isset($err["auth_fcfppport"])) formerr($err["auth_fchost"]); ?>
</TD>
<TD>
<?php print_string("auth_fcfppport","auth") ?>
</TD>
</TR>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fcuserid:</TD>
<TD>
<INPUT name=auth_fcuserid TYPE=text SIZE=30 MAXLENGTH=15 VALUE="<?php echo $config->auth_fcuserid?>">
<?php if (isset($err["auth_fcuserid"])) formerr($err["auth_fcuserid"]); ?>
</TD>
<TD>
<?php print_string("auth_fcuserid","auth") ?>
</TD>
</TR>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fcpasswd:</TD>
<TD>
<INPUT name=auth_fcpasswd TYPE=password SIZE=30 MAXLENGTH=12 VALUE="<?php echo $config->auth_fcpasswd?>">
<?php if (isset($err["auth_fcpasswd"])) formerr($err["auth_fcpasswd"]); ?>
</TD>
<TD>
<?php print_string("auth_fcpasswd","auth") ?>
</TD>
</TR>
<TR valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_fccreators:</TD>
<TD>
<INPUT name=auth_fccreators TYPE=text SIZE=30 VALUE="<?php echo $config->auth_fccreators?>">
<?php if (isset($err["auth_fccreators"])) formerr($err["auth_fccreators"]); ?>
</TD>
<TD>
<?php print_string("auth_fccreators","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><?php print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><?php p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
-218
View File
@@ -1,218 +0,0 @@
<?php
/************************************************************************/
/* fcFPP: Php class for FirstClass Flexible Provisining Protocol */
/* ============================================================= */
/* */
/* Copyright (c) 2004 SKERIA Utveckling, Teknous */
/* http://skeria.skelleftea.se */
/* */
/* Flexible Provisioning Protocol is a real-time, IP based protocol */
/* which provides direct access to the scriptable remote administration */
/* subsystem of the core FirstClass Server. Using FPP, it is possible to*/
/* implement automated provisioning and administration systems for */
/* FirstClass, avoiding the need for a point and click GUI. FPP can also*/
/* be used to integrate FirstClass components into a larger unified */
/* system. */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Author: Torsten Anderson, torsten.anderson@skeria.skelleftea.se
*/
class fcFPP
{
var $_hostname; // hostname of FirstClass server we are connection to
var $_port; // port on which fpp is running
var $_conn = 0; // socket we are connecting on
var $_debug = FALSE; // set to true to see some debug info
// class constructor
function fcFPP($host="localhost", $port="3333")
{
$this->_hostname = $host;
$this->_port = $port;
$this->_user = "";
$this->_pwd = "";
}
// open a connection to the FirstClass server
function open()
{
if($this->_debug) echo "Connecting to host ";
$host = $this->_hostname;
$port = $this->_port;
if($this->_debug) echo "[$host:$port]..";
// open the connection to the FirstClass server
$conn = fsockopen($host, $port, $errno, $errstr, 5);
if(!$conn)
{
echo "connection failed!".$errno. $errstr;
return false;
}
// We are connected
if($this->_debug) echo "connected!";
// Read connection message.
$line = fgets ($conn); //+0
$line = fgets ($conn); //new line
// store the connection in this class, so we can use it later
$this->_conn = & $conn;
return true;
}
// close any open connections
function close()
{
// get the current connection
$conn = &$this->_conn;
// close it if it's open
if($conn)
{
fclose($conn);
// cleanup the variable
unset($this->_conn);
return true;
}
return;
}
// Authenticate to the FirstClass server
function login($userid, $passwd)
{
// we did have a connection right?!
if($this->_conn)
{
# Send username
fputs($this->_conn,"$userid\r\n");
$line = fgets ($this->_conn); //new line
$line = fgets ($this->_conn); //+0
$line = fgets ($this->_conn); //new line
# Send password
fputs($this->_conn,"$passwd\r\n");
$line = fgets ($this->_conn); //new line
$line = fgets ($this->_conn); //+0
$line = fgets ($this->_conn); //+0 or message
if($this->_debug) echo $line;
if (preg_match ("/^\+0/", $line)) { //+0, user with subadmin privileges
$this->_user = $userid;
$this->_pwd = $passwd;
return TRUE;
} elseif (preg_match ("/^\Sorry/",$line)){ //Denied access but a valid user and password
return TRUE;
} else { //Invalid user or password
return FALSE;
}
}
return FALSE;
}
// Get the list of groups the user is a member of
function getGroups($userid){
$groups = array();
// we must be logged in as a user with subadmin privileges
if($this->_conn AND $this->_user) {
# Send BA-command to get groups
fputs($this->_conn,"GET USER '" . $userid . "' 4 -1\r");
$line = "";
while (!$line) {
$line = trim(fgets ($this->_conn));
}
$n = 0;
while ($line AND !preg_match("/^\+0/", $line) AND $line != "-1003") {
list( , , $groups[$n++]) = explode(" ",$line,3);
$line = trim(fgets ($this->_conn));
}
if($this->_debug) echo "getGroups:" . implode(",",$groups);
}
return $groups;
}
// Check if the user is member of any of the groups.
// Return the list of groups the user is member of.
function isMemberOf($userid, $groups){
$usergroups = array_map("strtolower",$this->getGroups($userid));
$groups = array_map("strtolower",$groups);
$result = array_intersect($groups,$usergroups);
if($this->_debug) echo "isMemberOf:" . implode(",",$result);
return $result;
}
function getUserInfo($userid, $field){
$userinfo = "";
if($this->_conn AND $this->_user) {
# Send BA-command to get data
fputs($this->_conn,"GET USER '" . $userid . "' " . $field . "\r");
$line = "";
while (!$line) {
$line = trim(fgets ($this->_conn));
}
$n = 0;
while ($line AND !preg_match("/^\+0/", $line)) {
list( , , $userinfo) = explode(" ",$line,3);
$line = trim(fgets ($this->_conn));
}
if($this->_debug) echo "getUserInfo:" . $userinfo;
}
return str_replace('\r',' ',trim($userinfo,'"'));
}
function getResume($userid){
$resume = "";
$pattern = "/\[.+:.+\..+\]/"; // Remove references to pictures in resumes
if($this->_conn AND $this->_user) {
# Send BA-command to get data
fputs($this->_conn,"GET RESUME '" . $userid . "' 6\r");
$line = "";
while (!$line) {
$line = trim(fgets ($this->_conn));
}
$n = 0;
while ($line AND !preg_match("/^\+0/", $line)) {
$resume .= preg_replace($pattern,"",str_replace('\r',"\n",trim($line,'6 ')));
$line = trim(fgets ($this->_conn));
//print $line;
}
if($this->_debug) echo "getResume:" . $resume;
}
return $resume;
}
}
?>
-154
View File
@@ -1,154 +0,0 @@
<?php // $Id$
// FirstClass authentication using FirstClass Flexible Provisining Protocol
/* Author: Torsten Anderson, torsten.anderson@skeria.skelleftea.se
CHANGELOG
README
Module will authenticate user against FirstClass server and check if user belongs to any of
the defined creator groups.
User authenticates using their existing FirstClass username and password.
Where possible userdata is copied from the FirstClass directory to Moodle. You may
want to modify this.
Module requires the fcFPP class to do it's jobb.
*/
require('fcFPP.php');
function auth_user_login ($username, $password) {
/// Returns true if the username and password work
/// and false if they don't
global $CFG;
$hostname = $CFG->auth_fchost;
$port = $CFG->auth_fcfppport;
$retval = FALSE;
if (!$username or !$password) { // Don't allow blank usernames or passwords
return $retval;
}
$fpp = new fcFPP($hostname,$port);
if ($fpp->open()) {
if ($fpp->login($username,$password)){
$retval = TRUE;
}
}
$fpp->close();
return $retval;
}
function auth_get_userinfo($username){
// Get user information from FirstCLass server and return it in an array.
// Localize this routine to fit your needs.
/*
Moodle FirstCLass fieldID in UserInfo form
------ -----------------------------------
firstname 1202
lastname 1204
email 1252
icq -
phone1 1206
phone2 1207 (Fax)
institution -
department -
address 1205
city -
country -
lang -
timezone 8030 (Not used yet. Need to figure out how FC codes timezones)
description Get data from users resume. Pictures will be removed.
*/
global $CFG;
$hostname = $CFG->auth_fchost;
$port = $CFG->auth_fcfppport;
$userid = $CFG->auth_fcuserid;
$passwd = $CFG->auth_fcpasswd;
$userinfo = array();
$fpp = new fcFPP($hostname,$port);
if ($fpp->open()) {
if ($fpp->login($userid,$passwd)){
$userinfo['firstname'] = $fpp->getUserInfo($username,"1202");
$userinfo['lastname'] = $fpp->getUserInfo($username,"1204");
$userinfo['email'] = strtok($fpp->getUserInfo($username,"1252"),',');
$userinfo['phone1'] = $fpp->getUserInfo($username,"1206");
$userinfo['phone2'] = $fpp->getUserInfo($username,"1207");
$userinfo['description'] = $fpp->getResume($username);
}
}
$fpp->close();
foreach($userinfo as $key => $value) {
if (!$value) {
unset($userinfo[$key]);
}
}
return $userinfo;
}
function auth_iscreator($username=0) {
//Get users group membership from the FirstClass server user and check if
// user is member of one of the groups of creators.
global $CFG, $USER;
if (! $CFG->auth_fccreators) {
return false;
}
if (! $username) {
$username=$USER->username;
}
$fcgroups = array();
$hostname = $CFG->auth_fchost;
$port = $CFG->auth_fcfppport;
$userid = $CFG->auth_fcuserid;
$passwd = $CFG->auth_fcpasswd;
$fpp = new fcFPP($hostname,$port);
if ($fpp->open()) {
if ($fpp->login($userid,$passwd)){
$fcgroups = $fpp->getGroups($username);
}
}
$fpp->close();
if ((! $fcgroups)) {
return false;
}
$creators = explode(";",$CFG->auth_fccreators);
foreach($creators as $creator) {
If (in_array($creator, $fcgroups)) return true;
}
return false;
}
+2 -3
View File
@@ -479,15 +479,14 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
//Create them as needed
schedule_backup_log($starttime,$preferences->backup_course," checking temp structures");
$status = check_and_create_backup_dir($preferences->backup_unique_code);
//Empty backup dir
//Empty dir
if ($status) {
schedule_backup_log($starttime,$preferences->backup_course," cleaning current dir");
schedule_backup_log($starttime,$preferences->backup_course," cleaning old data");
$status = clear_backup_dir($preferences->backup_unique_code);
}
//Delete old_entries from backup tables
if ($status) {
schedule_backup_log($starttime,$preferences->backup_course," cleaning old data");
$status = backup_delete_old_data();
}
+4 -12
View File
@@ -557,7 +557,6 @@
fwrite ($bf,full_tag("PASSWORD",3,false,$course->password));
fwrite ($bf,full_tag("FULLNAME",3,false,$course->fullname));
fwrite ($bf,full_tag("SHORTNAME",3,false,$course->shortname));
fwrite ($bf,full_tag("IDNUMBER",3,false,$course->idnumber));
fwrite ($bf,full_tag("SUMMARY",3,false,$course->summary));
fwrite ($bf,full_tag("FORMAT",3,false,$course->format));
fwrite ($bf,full_tag("SHOWGRADES",3,false,$course->showgrades));
@@ -569,7 +568,6 @@
fwrite ($bf,full_tag("STUDENTS",3,false,$course->students));
fwrite ($bf,full_tag("GUEST",3,false,$course->guest));
fwrite ($bf,full_tag("STARTDATE",3,false,$course->startdate));
fwrite ($bf,full_tag("ENROLPERIOD",3,false,$course->enrolperiod));
fwrite ($bf,full_tag("NUMSECTIONS",3,false,$course->numsections));
//fwrite ($bf,full_tag("SHOWRECENT",3,false,$course->showrecent)); INFO: This is out in 1.3
fwrite ($bf,full_tag("MAXBYTES",3,false,$course->maxbytes));
@@ -577,7 +575,6 @@
fwrite ($bf,full_tag("GROUPMODE",3,false,$course->groupmode));
fwrite ($bf,full_tag("GROUPMODEFORCE",3,false,$course->groupmodeforce));
fwrite ($bf,full_tag("LANG",3,false,$course->lang));
fwrite ($bf,full_tag("COST",3,false,$course->cost));
fwrite ($bf,full_tag("MARKER",3,false,$course->marker));
fwrite ($bf,full_tag("VISIBLE",3,false,$course->visible));
fwrite ($bf,full_tag("HIDDENSECTIONS",3,false,$course->hiddensections));
@@ -749,7 +746,6 @@
fwrite ($bf,full_tag("URL",4,false,$user_data->url));
fwrite ($bf,full_tag("DESCRIPTION",4,false,$user_data->description));
fwrite ($bf,full_tag("MAILFORMAT",4,false,$user_data->mailformat));
fwrite ($bf,full_tag("MAILDIGEST",4,false,$user_data->maildigest));
fwrite ($bf,full_tag("MAILDISPLAY",4,false,$user_data->maildisplay));
fwrite ($bf,full_tag("HTMLEDITOR",4,false,$user_data->htmleditor));
fwrite ($bf,full_tag("AUTOSUBSCRIBE",4,false,$user_data->autosubscribe));
@@ -798,8 +794,6 @@
fwrite ($bf,full_tag("AUTHORITY",6,false,$tea->authority));
fwrite ($bf,full_tag("TEA_ROLE",6,false,$tea->role));
fwrite ($bf,full_tag("EDITALL",6,false,$tea->editall));
fwrite ($bf,full_tag("TIMESTART",6,false,$tea->timestart));
fwrite ($bf,full_tag("TIMEEND",6,false,$tea->timeend));
fwrite ($bf,full_tag("TIMEMODIFIED",6,false,$tea->timemodified));
fwrite ($bf,full_tag("TIMEACCESS",6,false,$tea->timeaccess));
//Print ROLE end
@@ -1140,9 +1134,8 @@
//This function encode things to make backup multi-site fully functional
//It does this conversions:
// - $CFG->wwwroot/file.php/courseid ------------------> $@FILEPHP@$ (slasharguments links)
// - $CFG->wwwroot/file.php?file=/courseid ------------> $@FILEPHP@$ (non-slasharguments links)
// - Every module xxxx_encode_content_links() is executed too
// - $CFG->wwwroot/file.php/courseid ----------------------> $@FILEPHP@$
// - Links to forums everywhere (DB) are encoded.
//
function backup_encode_absolute_links($content) {
@@ -1159,10 +1152,9 @@
}
//First, we check for every call to file.php inside the course
$search = array($CFG->wwwroot.'/file.php/'.$mypreferences->backup_course,
$CFG->wwwroot.'/file.php?file=/'.$mypreferences->backup_course);
$search = array($CFG->wwwroot."/file.php/".$mypreferences->backup_course);
$replace = array('$@FILEPHP@$','$@FILEPHP@$');
$replace = array("$@FILEPHP@$");
$result = str_replace($search,$replace,$content);
+3 -3
View File
@@ -25,15 +25,15 @@
}
//Delete old data in backup tables (if exists)
//Four hours seem to be appropiate now that backup is stable
//Two days seems to be apropiate
function backup_delete_old_data() {
global $CFG;
//Change this if you want !!
$hours = 4;
$days = 2;
//End change this
$seconds = $hours * 60 * 60;
$seconds = $days * 24 * 60 * 60;
$delete_from = time()-$seconds;
//Now delete from tables
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_ids
+1 -1
View File
@@ -296,7 +296,7 @@
rebuild_course_cache($restore->course_id);
//categories table
$course = get_record("course","id",$restore->course_id);
fix_course_sortorder();
fix_course_sortorder($course->category);
}
//Cleanup temps (files and db)
+7 -8
View File
@@ -101,14 +101,13 @@
<SCRIPT LANGUAGE="JavaScript">
<!--
function selectItemInMenuByName(formId, menuName, selectIndex ) {
myForm = document.getElementById(formId)
for (i=0,n=myForm.elements.length;i<n;i++) {
myLen = menuName.length;
myName = myForm.elements[i].name;
myType = myForm.elements[i].type;
if (myName.substring(0,myLen) == menuName && myType == "select-one")
myForm.elements[i].options[selectIndex].selected = true;
}
myForm = document.getElementById(formId)
for (i=0,n=myForm.elements.length;i<n;i++) {
myLen = menuName.length;
myName = myForm.elements[i].name;
if (myName.substring(0,myLen) == menuName)
myForm.elements[i].options[selectIndex].selected = true;
}
}
-->
</script>
+1 -11
View File
@@ -52,10 +52,10 @@
$backup_unique_code = time();
//Now check and create the backup dir (if it doesn't exist)
echo "<li>".get_string("creatingtemporarystructures");
$status = check_and_create_backup_dir($backup_unique_code);
//Empty dir
if ($status) {
echo "<li>".get_string("creatingtemporarystructures");
$status = clear_backup_dir($backup_unique_code);
}
@@ -109,16 +109,6 @@
echo "</tr></td>";
echo "</table>";
//We compare Moodle's versions
if ($CFG->version < $info->backup_moodle_version && $status) {
$message->serverversion = $CFG->version;
$message->serverrelease = $CFG->release;
$message->backupversion = $info->backup_moodle_version;
$message->backuprelease = $info->backup_moodle_release;
print_simple_box(get_string('noticenewerbackup','',$message), "center", "70%", "$THEME->cellheading2", "20", "noticebox");
}
//Now we print in other table, the backup and the course it contains info
if ($info and $course_header and $status) {
//First, the course info
+12 -50
View File
@@ -125,22 +125,19 @@
}
$formatwiki = FORMAT_WIKI;
$typewiki = WIKITEXT;
//FORUM: Decode every POST (message) in the course
//Check we are restoring forums
if ($restore->mods['forum']->restore == 1) {
echo "<li>".get_string("from")." ".get_string("modulenameplural","forum");
//Get all course posts being restored
//Get all course posts
if ($posts = get_records_sql ("SELECT p.id, p.message
FROM {$CFG->prefix}forum_posts p,
{$CFG->prefix}forum_discussions d,
{$CFG->prefix}backup_ids b
{$CFG->prefix}forum_discussions d
WHERE d.course = $restore->course_id AND
p.discussion = d.id AND
p.format = $formatwiki AND
b.backup_code = $restore->backup_unique_code AND
b.table_name = 'forum_posts' AND
b.new_id = p.id")) {
p.format = $formatwiki")) {
//Iterate over each post->message
$i = 0; //Counter to send some output to the browser to avoid timeouts
foreach ($posts as $post) {
@@ -175,16 +172,11 @@
//Check we are restoring resources
if ($restore->mods['resource']->restore == 1) {
echo "<li>".get_string("from")." ".get_string("modulenameplural","resource");
//Get all course resources of type='text' and options=FORMAT_WIKI being restored
//Get all course resources of type=8 WIKITEXT
if ($resources = get_records_sql ("SELECT r.id, r.alltext
FROM {$CFG->prefix}resource r,
{$CFG->prefix}backup_ids b
FROM {$CFG->prefix}resource r
WHERE r.course = $restore->course_id AND
r.type = 'text' AND
r.options = $formatwiki AND
b.backup_code = $restore->backup_unique_code AND
b.table_name = 'resource' AND
b.new_id = r.id")) {
r.type = $typewiki")) {
//Iterate over each resource->alltext
$i = 0; //Counter to send some output to the browser to avoid timeouts
foreach ($resources as $resource) {
@@ -536,8 +528,7 @@
$course->password = addslashes($course_header->course_password);
$course->fullname = addslashes($course_header->course_fullname);
$course->shortname = addslashes($course_header->course_shortname);
$course->idnumber = addslashes($course_header->course_idnumber);
$course->summary = restore_decode_absolute_links(addslashes($course_header->course_summary));
$course->summary = addslashes($course_header->course_summary);
$course->format = addslashes($course_header->course_format);
$course->showgrades = addslashes($course_header->course_showgrades);
$course->blockinfo = addslashes($course_header->blockinfo);
@@ -548,7 +539,6 @@
$course->students = addslashes($course_header->course_students);
$course->guest = addslashes($course_header->course_guest);
$course->startdate = addslashes($course_header->course_startdate);
$course->enrolperiod = addslashes($course_header->course_enrolperiod);
$course->numsections = addslashes($course_header->course_numsections);
//$course->showrecent = addslashes($course_header->course_showrecent); INFO: This is out in 1.3
$course->maxbytes = addslashes($course_header->course_maxbytes);
@@ -556,7 +546,6 @@
$course->groupmode = addslashes($course_header->course_groupmode);
$course->groupmodeforce = addslashes($course_header->course_groupmodeforce);
$course->lang = addslashes($course_header->course_lang);
$course->cost = addslashes($course_header->course_cost);
$course->marker = addslashes($course_header->course_marker);
$course->visible = addslashes($course_header->course_visible);
$course->hiddensections = addslashes($course_header->course_hiddensections);
@@ -617,7 +606,7 @@
$sequence = "";
$section->course = $restore->course_id;
$section->section = $sect->number;
$section->summary = restore_decode_absolute_links(addslashes($sect->summary));
$section->summary = addslashes($sect->summary);
$section->visible = $sect->visible;
$section->sequence = "";
//Now calculate the section's newid
@@ -807,7 +796,7 @@
$user->address = addslashes($user->address);
$user->city = addslashes($user->city);
$user->url = addslashes($user->url);
$user->description = restore_decode_absolute_links(addslashes($user->description));
$user->description = addslashes($user->description);
//We are going to create the user
//The structure is exactly as we need
$newid = insert_record ("user",$user);
@@ -1260,8 +1249,7 @@
//This function decode things to make restore multi-site fully functional
//It does this conversions:
// - $@FILEPHP@$ ---|------------> $CFG->wwwroot/file.php/courseid (slasharguments on)
// |------------> $CFG->wwwroot/file.php?file=/courseid (slasharguments off)
// - $@FILEPHP@$ -------------------------------> $CFG->wwwroot/file.php/courseid
//
//Note: Inter-activities linking is being implemented as a final
//step in the restore execution, because we need to have it
@@ -1272,16 +1260,8 @@
//Now decode wwwroot and file.php calls
$search = array ("$@FILEPHP@$");
//Check for the status of the slasharguments config variable
$slash = $CFG->slasharguments;
//Build the replace string as needed
if ($slash == 1) {
$replace = array ($CFG->wwwroot."/file.php/".$restore->course_id);
} else {
$replace = array ($CFG->wwwroot."/file.php?file=/".$restore->course_id);
}
$replace = array ($CFG->wwwroot."/file.php/".$restore->course_id);
$result = str_replace($search,$replace,$content);
@@ -2180,9 +2160,6 @@
case "SHORTNAME":
$this->info->course_shortname = $this->getContents();
break;
case "IDNUMBER":
$this->info->course_idnumber = $this->getContents();
break;
case "SUMMARY":
$this->info->course_summary = $this->getContents();
break;
@@ -2216,9 +2193,6 @@
case "STARTDATE":
$this->info->course_startdate = $this->getContents();
break;
case "ENROLPERIOD":
$this->info->course_enrolperiod = $this->getContents();
break;
case "NUMSECTIONS":
$this->info->course_numsections = $this->getContents();
break;
@@ -2240,9 +2214,6 @@
case "LANG":
$this->info->course_lang = $this->getContents();
break;
case "COST":
$this->info->course_cost = $this->getContents();
break;
case "MARKER":
$this->info->course_marker = $this->getContents();
break;
@@ -2509,9 +2480,6 @@
case "MAILFORMAT":
$this->info->tempuser->mailformat = $this->getContents();
break;
case "MAILDIGEST":
$this->info->tempuser->maildigest = $this->getContents();
break;
case "MAILDISPLAY":
$this->info->tempuser->maildisplay = $this->getContents();
break;
@@ -2554,12 +2522,6 @@
case "EDITALL":
$this->info->temprole->editall = $this->getContents();
break;
case "TIMESTART":
$this->info->temprole->timestart = $this->getContents();
break;
case "TIMEEND":
$this->info->temprole->timeend = $this->getContents();
break;
case "TIMEMODIFIED":
$this->info->temprole->timemodified = $this->getContents();
break;
+2 -2
View File
@@ -5,6 +5,6 @@
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$backup_version = 2004073000; // The current version is a date (YYYYMMDDXX)
$backup_version = 2004052400; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.4 development"; // User-friendly version number
$backup_release = "1.3"; // User-friendly version number
@@ -26,7 +26,7 @@ class CourseBlock_activity_modules extends MoodleBlock {
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
if ($modname != 'label') {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/mod/'.$modname.'/index.php?id='.$this->course->id.'">'.$modnamesplural[$modname].'</a>';
$this->content->items[] = '<a href="../mod/'.$modname.'/index.php?id='.$this->course->id.'">'.$modnamesplural[$modname].'</a>';
$this->content->icons[] = '<img src="'.$CFG->modpixpath.'/'.$modname.'/icon.gif" height="16" width="16" alt="">';
}
}
+6 -53
View File
@@ -5,14 +5,12 @@ class CourseBlock_admin extends MoodleBlock {
$this->title = get_string('administration');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2005052800;
$this->version = 2004041000;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
}
function get_content() {
global $USER, $CFG, $THEME;
require_once($CFG->dirroot.'/mod/forum/lib.php');
if($this->content !== NULL) {
return $this->content;
@@ -23,52 +21,6 @@ class CourseBlock_admin extends MoodleBlock {
$this->content->icons = array();
$this->content->footer = '';
if($this->course->id == 1) {
$this->load_content_for_site();
}
else {
$this->load_content_for_course();
}
return $this->content;
}
function load_content_for_site() {
global $CFG;
if (isadmin()) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/configure.php">'.get_string('configuration').'</a>...';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/admin.gif" height="16" width="16" alt="" />';
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/users.php">'.get_string('users').'</a>...';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="" />';
}
if (iscreator()) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/index.php?edit=on">'.get_string('courses').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/course.gif" height="16" width="16" alt="" />';
}
if (isadmin()) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/log.php?id=1">'.get_string('logs').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" height="16" width="16" alt="" />';
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/files/index.php?id=1">'.get_string('sitefiles').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/files.gif" height="16" width="16" alt="" />';
if (file_exists($CFG->dirroot.'/'.$CFG->admin.'/'.$CFG->dbtype)) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/'.$CFG->dbtype.'/frame.php">'.get_string('managedatabase').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/db.gif" height="16" width="16" alt="" />';
}
$this->content->footer = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/">'.get_string('admin').'</a>...';
}
}
function load_content_for_course() {
global $CFG, $USER;
require_once($CFG->dirroot.'/mod/forum/lib.php');
if (isguest()) {
return $this->content;
}
@@ -130,7 +82,6 @@ class CourseBlock_admin extends MoodleBlock {
}
} else if (!isguest()) { // Students menu
if ($this->course->showgrades) {
$this->content->items[]='<a href="grade.php?id='.$this->course->id.'">'.get_string('grades').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" height="16" width="16" alt="">';
@@ -151,6 +102,8 @@ class CourseBlock_admin extends MoodleBlock {
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
}
}
return $this->content;
}
}
@@ -5,11 +5,7 @@ class CourseBlock_calendar_month extends MoodleBlock {
$this->title = get_string('calendar', 'calendar');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2005052600;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$this->version = 2004052400;
}
function get_content() {
@@ -5,11 +5,7 @@ class CourseBlock_calendar_upcoming extends MoodleBlock {
$this->title = get_string('upcomingevents', 'calendar');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052600;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$this->version = 2004052400;
}
function get_content() {
@@ -26,7 +22,7 @@ class CourseBlock_calendar_upcoming extends MoodleBlock {
$this->content = New object;
$this->content->text = '';
$this->content->footer = '<br /><a href="'.$CFG->wwwroot.'/calendar/view.php?view=upcoming&amp;course='.$this->course->id.'">'.get_string('gotocalendar', 'calendar').'</a>...';
$this->content->footer .= '<br /><a href="'.$CFG->wwwroot.'/calendar/event.php?action=new&amp;course='.$this->course->id.'">'.get_string('newevent', 'calendar').'</a>...';
$this->content->footer .= '<br /><a href="'.$CFG->wwwroot.'/calendar/event.php?action=new">'.get_string('newevent', 'calendar').'</a>...';
if($this->course === NULL) {
// Overrides: use no course at all
+8 -40
View File
@@ -2,33 +2,10 @@
class CourseBlock_course_list extends MoodleBlock {
function CourseBlock_course_list ($course) {
$this->title = get_string('courses');
$this->title = get_string('mycourses');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2005052600;
}
function has_config() {
return true;
}
function print_config() {
global $CFG, $THEME;
print_simple_box_start('center', '', $THEME->cellheading);
include($CFG->dirroot.'/blocks/'.$this->name().'/config.html');
print_simple_box_end();
return true;
}
function handle_config($config) {
foreach ($config as $name => $value) {
set_config($name, $value);
}
return true;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$this->version = 2004041800;
}
function get_content() {
@@ -50,15 +27,8 @@ class CourseBlock_course_list extends MoodleBlock {
$icon = "<img src=\"$CFG->wwwroot/theme/$CFG->theme/pix/i/course.gif\"".
" height=\"16\" width=\"16\" alt=\"".get_string("course")."\">";
}
$adminseesall = true;
if (isset($CFG->block_course_list_adminview)) {
if ( $CFG->block_course_list_adminview == 'own'){
$adminseesall = false;
}
}
if (isset($USER->id) and !(isadmin() and $adminseesall)) { // Just print My Courses
if (isset($USER->id) and !isadmin()) { // Just print My Courses
if ($courses = get_my_courses($USER->id)) {
foreach ($courses as $course) {
if (!$course->category) {
@@ -70,10 +40,8 @@ class CourseBlock_course_list extends MoodleBlock {
$this->content->icons[]=$icon;
}
$this->title = get_string('mycourses');
$this->content->footer = "<a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
if ($this->content->items) { // make sure we don't return an empty list
return $this->content;
}
$this->content->footer = "<p><a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
return $this->content;
}
}
@@ -85,12 +53,12 @@ class CourseBlock_course_list extends MoodleBlock {
$this->content->items[]="<a $linkcss href=\"$CFG->wwwroot/course/category.php?id=$category->id\">$category->name</a>";
$this->content->icons[]=$icon;
}
$this->content->footer = "<a href=\"$CFG->wwwroot/course/\">".get_string("searchcourses")."</a>...";
$this->content->footer = "<p><a href=\"$CFG->wwwroot/course/\">".get_string("searchcourses")."</a>...";
$this->title = get_string('categories');
} else { // Just print course names of single category
$category = array_shift($categories);
$courses = get_courses($category->id);
if ($courses) {
foreach ($courses as $course) {
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
@@ -98,7 +66,7 @@ class CourseBlock_course_list extends MoodleBlock {
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
$this->content->icons[]=$icon;
}
$this->content->footer = "<a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
$this->content->footer = "<p><a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
} else {
$this->content->items = array();
$this->content->icons = array();
-31
View File
@@ -1,31 +0,0 @@
<form method="post" action="block.php">
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><p>block_course_list_adminview:</td>
<td>
<input name="block" type="hidden" value="<?php echo intval($_REQUEST['block']); ?>" />
<select name="block_course_list_adminview">
<option value="all" <?php if(isset($CFG->block_course_list_adminview)){
if($CFG->block_course_list_adminview == "all"){ p("selected");}
}else{
p("selected");
}?>
><?php p(get_string('allcourses', 'block_course_list')) ?></option>
<option value="own" <?php if(isset($CFG->block_course_list_adminview)){
if($CFG->block_course_list_adminview == "own"){ p("selected"); }
}?>
><?php p(get_string('owncourses', 'block_course_list')) ?></option>
</select>
</td>
<td>
<?php print_string("configadminview", "block_course_list") ?>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>
</form>
+7 -24
View File
@@ -2,45 +2,28 @@
class CourseBlock_course_summary extends MoodleBlock {
function CourseBlock_course_summary ($course) {
if (empty($course->category)) { // Site level
$this->title = get_string('frontpagedescription');
} else {
$this->title = get_string('blockname','block_course_summary');
}
$this->title = get_string('blockname','block_course_summary');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052600;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$this->version = 2004041400;
}
function get_content() {
global $CFG, $THEME;
global $USER, $CFG;
if($this->content !== NULL) {
return $this->content;
}
$this->content = New stdClass;
$this->content->text = format_text($this->course->summary, FORMAT_HTML);
if (isediting($this->course->id)) {
if (empty($this->course->category)) {
$editpage = $CFG->wwwroot.'/admin/site.php';
} else {
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->course->id;
}
$this->content->text .= "<div align=\"right\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" /></a></div>";
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
$this->content->text = format_text($this->course->summary, FORMAT_HTML);
return $this->content;
}
function hide_header() {
return true;
}
function hide_header() {return true;}
}
?>
+15 -40
View File
@@ -66,46 +66,22 @@ class MoodleBlock {
case BLOCK_TYPE_NUKE:
case BLOCK_TYPE_TEXT:
if(empty($this->content->text) && empty($this->content->footer)) {
if(empty($this->edit_controls)) {
// No content, no edit controls, so just shut up
break;
}
else {
// No content but editing, so show something at least
$this->print_shadow();
}
break;
}
else {
if($this->hide_header() && empty($this->edit_controls)) {
// Header wants to hide, no edit controls to show, so no header it is
print_side_block(NULL, $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes());
}
else {
// The full treatment, please
print_side_block($title, $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes());
}
if ($this->edit_controls !== NULL || !$this->hide_header()) {
print_side_block($title, $this->content->text, NULL, NULL, $this->content->footer);
} else {
print_side_block(NULL, $this->content->text, NULL, NULL, $this->content->footer);
}
break;
case BLOCK_TYPE_LIST:
if(empty($this->content->items) && empty($this->content->footer)) {
if(empty($this->edit_controls)) {
// No content, no edit controls, so just shut up
break;
}
else {
// No content but editing, so show something at least
$this->print_shadow();
}
break;
}
else {
if($this->hide_header() && empty($this->edit_controls)) {
// Header wants to hide, no edit controls to show, so no header it is
print_side_block(NULL, '', $this->content->items, $this->content->icons, $this->content->footer, $this->html_attributes());
}
else {
// The full treatment, please
print_side_block($title, '', $this->content->items, $this->content->icons, $this->content->footer, $this->html_attributes());
}
if ($this->edit_controls !== NULL || !$this->hide_header()) {
print_side_block($title, '', $this->content->items, $this->content->icons, $this->content->footer);
} else {
print_side_block(NULL, '', $this->content->items, $this->content->icons, $this->content->footer);
}
break;
}
@@ -117,7 +93,6 @@ class MoodleBlock {
}
print_side_block($title, '&nbsp;', NULL, NULL, '');
}
function add_edit_controls($options, $blockid) {
global $CFG, $THEME;
@@ -204,7 +179,7 @@ class MoodleBlock {
$errors[] = 'version_not_set';
$correct = false;
}
$allformats = COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$allformats = COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL;
if(!($this->applicable_formats() & $allformats)) {
$errors[] = 'no_course_formats';
$correct = false;
@@ -230,19 +205,19 @@ class MoodleBlock {
}
function applicable_formats() {
// Default case: the block can be used in all course types
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL;
}
function preferred_width() {
// Default case: the block wants to be 180 pixels wide
return 180;
}
function hide_header() {
//Default, false--> the header is shown
//Default, false--> the header is showed
return false;
}
function html_attributes() {
// Default case: just an id for the block, with our name in it
return array('id' => 'block_'.$this->name());
// Default case: we want no extra attributes
return false;
}
}
+1 -6
View File
@@ -5,11 +5,7 @@ class CourseBlock_news_items extends MoodleBlock {
$this->title = get_string('latestnews');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052600;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$this->version = 2004041200;
}
function get_content() {
@@ -20,7 +16,6 @@ class CourseBlock_news_items extends MoodleBlock {
}
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
$this->content = New object;
$this->content->text = '';
+1 -5
View File
@@ -5,11 +5,7 @@ class CourseBlock_online_users extends MoodleBlock {
$this->title = get_string('blockname','block_online_users');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052700;
}
function applicable_formats() {
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL | COURSE_FORMAT_SITE;
$this->version = 2004041800;
}
function has_config() {return true;}
+11 -13
View File
@@ -5,7 +5,7 @@ class CourseBlock_participants extends MoodleBlock {
$this->title = get_string('people');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004052600;
$this->version = 2004041800;
}
function get_content() {
@@ -23,31 +23,29 @@ class CourseBlock_participants extends MoodleBlock {
$strgroups = get_string('groups');
$strgroupmy = get_string('groupmy');
$this->content->items[]='<a title="'.get_string('listofallpeople').'" href="'.$CFG->wwwroot.'/user/index.php?id='.$this->course->id.'">'.get_string('participants').'</a>';
$this->content->items[]='<a title="'.get_string('listofallpeople').'" href="../user/index.php?id='.$this->course->id.'">'.get_string('participants').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="">';
if ($this->course->groupmode or !$this->course->groupmodeforce) {
if ($this->course->groupmode == VISIBLEGROUPS or isteacheredit($this->course->id)) {
$this->content->items[]='<a title="'.$strgroups.'" href="'.$CFG->wwwroot.'/course/groups.php?id='.$this->course->id.'">'.$strgroups.'</a>';
$this->content->items[]='<a title="'.$strgroups.'" href="groups.php?id='.$this->course->id.'">'.$strgroups.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" height="16" width="16" alt="">';
} else if ($this->course->groupmode == SEPARATEGROUPS and $this->course->groupmodeforce) {
// Show nothing
} else if ($currentgroup = get_current_group($this->course->id)) {
$this->content->items[]='<a title="'.$strgroupmy.'" href="'.$CFG->wwwroot.'/course/group.php?id='.$this->course->id.'">'.$strgroupmy.'</a>';
$this->content->items[]='<a title="'.$strgroupmy.'" href="group.php?id='.$this->course->id.'">'.$strgroupmy.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" height="16" width="16" alt="">';
}
}
if(!empty($USER)) {
$fullname = fullname($USER, true);
$editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.$this->course->id.'">'.get_string('editmyprofile').'</a>';
if ($USER->description) {
$this->content->items[]= $editmyprofile;
} else {
$this->content->items[]= $editmyprofile." <blink>*</blink>";
}
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
$fullname = fullname($USER, true);
$editmyprofile = '<a title="'.$fullname.'" href="../user/edit.php?id='.$USER->id.'&amp;course='.$this->course->id.'">'.get_string('editmyprofile').'</a>';
if ($USER->description) {
$this->content->items[]= $editmyprofile;
} else {
$this->content->items[]= $editmyprofile." <blink>*</blink>";
}
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
return $this->content;
}
+8 -16
View File
@@ -14,9 +14,9 @@ class CourseBlock_section_links extends MoodleBlock {
}
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052800;
$this->version = 2004050500;
}
function applicable_formats() {
return (COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS);
}
@@ -55,26 +55,18 @@ class CourseBlock_section_links extends MoodleBlock {
}
$text = '<font size=-1>';
for ($i = $inc; $i <= $this->course->numsections; $i += $inc) {
$isvisible = get_field('course_sections', 'visible', 'course', $this->course->id, 'section', $i);
if (!$isvisible and !isteacher($this->course->id)) {
continue;
}
$style = ($isvisible) ? '' : ' class="dimmed"';
if ($i == $highlight) {
$text .= "<a href=\"$link$i\"$style><b>$i</b></a> ";
$text .= "<a href=\"$link$i\"><b>$i</b></a> ";
} else {
$text .= "<a href=\"$link$i\"$style>$i</a> ";
$text .= "<a href=\"$link$i\">$i</a> ";
}
}
if ($highlight) {
$isvisible = get_field('course_sections', 'visible', 'course', $this->course->id, 'section', $highlight);
if ($isvisible or isteacher($this->course->id)) {
$style = ($isvisible) ? '' : ' class="dimmed"';
$text .= "<br><a href=\"$link$highlight\"$style>$linktext</a>";
}
$text .= "<br><a href=\"$link$highlight\">$linktext</a>";
}
$this->content = New stdClass;
$this->content = New object;
$this->content->header = 'Hello';
$this->content->footer = '';
$this->content->text = $text;
return $this->content;
@@ -1,134 +0,0 @@
<?php //$Id$
class CourseBlock_site_main_menu extends MoodleBlock {
function CourseBlock_site_main_menu ($course) {
$this->title = get_string('mainmenu');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004052700;
}
function applicable_formats() {
return COURSE_FORMAT_SITE;
}
function get_content() {
global $USER, $CFG;
if ($this->content !== NULL) {
return $this->content;
}
if (empty($this->course)) {
return '';
}
$this->content = New stdClass;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
$isteacher = isteacher($this->course->id);
$isediting = isediting($this->course->id);
$ismoving = ismoving($this->course->id);
$sections = get_all_sections($this->course->id);
$section = $sections[0];
if($section->sequence || $isediting) {
get_all_mods($this->course->id, $mods, $modnames, $modnamesplural, $modnamesused);
}
$groupbuttons = $this->course->groupmode;
$groupbuttonslink = (!$this->course->groupmodeforce);
if ($ismoving) {
$strmovehere = get_string('movehere');
$strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'"));
$strcancel= get_string('cancel');
$stractivityclipboard = $USER->activitycopyname;
}
$modinfo = unserialize($this->course->modinfo);
$editbuttons = '';
if ($ismoving) {
$this->content->icons[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
$this->content->items[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
}
if (!empty($section->sequence)) {
$sectionmods = explode(',', $section->sequence);
foreach ($sectionmods as $modnumber) {
if (empty($mods[$modnumber])) {
continue;
}
$mod = $mods[$modnumber];
if ($isediting && !$ismoving) {
if ($groupbuttons) {
if (! $mod->groupmodelink = $groupbuttonslink) {
$mod->groupmode = $this->course->groupmode;
}
} else {
$mod->groupmode = false;
}
$editbuttons = '<br />'.make_editing_buttons($mod, true, true);
} else {
$editbuttons = '';
}
if ($mod->visible || $isteacher) {
if ($ismoving) {
if ($mod->id == $USER->activitycopy) {
continue;
}
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'">'.
'<img height="16" width="80" src="'.$CFG->pixpath.'/movehere.gif" alt="'.$strmovehere.'" border="0"></a>';
$this->content->icons[] = '';
}
$instancename = urldecode($modinfo[$modnumber]->name);
if (!empty($CFG->filterall)) {
$instancename = filter_text('<nolink>'.$instancename.'</nolink>', $this->course->id);
}
$linkcss = $mod->visible ? '' : ' class="dimmed" ';
if (!empty($modinfo[$modnumber]->extra)) {
$extra = urldecode($modinfo[$modnumber]->extra);
} else {
$extra = '';
}
if (!empty($modinfo[$modnumber]->icon)) {
$icon = $CFG->pixpath.'/'.urldecode($modinfo[$modnumber]->icon);
} else {
$icon = $CFG->modpixpath.'/'.$mod->modname.'/icon.gif';
}
if ($mod->modname == 'label') {
$this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
$this->content->icons[] = '';
} else {
$this->content->items[] = '<a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$instancename.'</a>'.$editbuttons;
$this->content->icons[] = '<img src="'.$icon.'" height="16" width="16" alt="'.$mod->modfullname.'">';
}
}
}
}
if ($ismoving) {
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'">'.
'<img height="16" width="80" src="'.$CFG->pixpath.'/movehere.gif" alt="'.$strmovehere.'" border="0"></a>';
$this->content->icons[] = '';
}
if ($isediting && $modnames) {
$this->content->footer = '<div style="text-align: right;">'.
print_section_add_menus($this->course, 0, $modnames, true, true).'</div>';
} else {
$this->content->footer = '';
}
return $this->content;
}
}
?>
@@ -15,12 +15,9 @@ class CourseBlock_social_activities extends MoodleBlock {
function get_content() {
global $USER, $CFG;
if ($this->content !== NULL) {
if($this->content !== NULL) {
return $this->content;
}
if (empty($this->course)) {
return '';
}
$this->content = New object;
$this->content->items = array();
@@ -49,8 +46,8 @@ class CourseBlock_social_activities extends MoodleBlock {
$editbuttons = '';
if ($ismoving) {
$this->content->icons[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
$this->content->items[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
$this->content->items[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
$this->content->icons[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
}
if (!empty($section->sequence)) {
@@ -92,11 +89,6 @@ class CourseBlock_social_activities extends MoodleBlock {
} else {
$extra = '';
}
if (!empty($modinfo[$modnumber]->icon)) {
$icon = $CFG->pixpath.'/'.urldecode($modinfo[$modnumber]->icon);
} else {
$icon = $CFG->modpixpath.'/'.$mod->modname.'/icon.gif';
}
if ($mod->modname == 'label') {
$this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
@@ -104,7 +96,7 @@ class CourseBlock_social_activities extends MoodleBlock {
} else {
$this->content->items[] = '<a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$instancename.'</a>'.$editbuttons;
$this->content->icons[] = '<img src="'.$icon.'" height="16" width="16" alt="'.$mod->modfullname.'">';
$this->content->icons[] = '<img src="'.$CFG->modpixpath.'/'.$mod->modname.'/icon.gif" height="16" width="16" alt="'.$mod->modfullname.'">';
}
}
}
@@ -118,7 +110,8 @@ class CourseBlock_social_activities extends MoodleBlock {
if ($isediting && $modnames) {
$this->content->footer = '<div style="text-align: right;">'.
print_section_add_menus($this->course, 0, $modnames, true, true).'</div>';
popup_form($CFG->wwwroot.'/course/mod.php?id='.$this->course->id.'&amp;section='.$section->section.'&amp;add=',
$modnames, 'section0', '', get_string('add').'...', 'mods', get_string('activities'), true) . '</div>';
} else {
$this->content->footer = '';
}
+1 -1
View File
@@ -5,4 +5,4 @@
// database (blocks_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$blocks_version = 2004052700; // The current version is a date (YYYYMMDDXX)
$blocks_version = 2004052400; // The current version is a date (YYYYMMDDXX)
+9 -31
View File
@@ -39,9 +39,9 @@
/////////////////////////////////////////////////////////////////////////////
require_once('../config.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
require_once('lib.php');
require_once('../course/lib.php');
require_once('../mod/forum/lib.php');
require_login();
@@ -71,22 +71,6 @@
$defaultformat = FORMAT_MOODLE;
}
// If a course has been supplied in the URL, change the filters to show that one
if(!empty($_GET['course'])) {
if(is_numeric($_GET['course']) && $_GET['course'] > 0 && record_exists('course', 'id', $_GET['course'])) {
if($_GET['course'] == 1) {
// If coming from the home page, show all courses
$SESSION->cal_courses_shown = calendar_get_default_courses(true);
calendar_set_referring_course(0);
}
else {
// Otherwise show just this one
$SESSION->cal_courses_shown = intval($_GET['course']);
calendar_set_referring_course($SESSION->cal_courses_shown);
}
}
}
switch($_REQUEST['action']) {
case 'delete':
$title = get_string('deleteevent', 'calendar');
@@ -221,7 +205,7 @@
switch($_REQUEST['action']) {
case 'delete':
if(!empty($_REQUEST['confirm']) && $_REQUEST['confirm'] == 1) {
if($_REQUEST['confirm'] == 1) {
// Kill it and redirect to day view
if(($event = get_record('event', 'id', $_REQUEST['id'])) !== false) {
/// Log the event delete.
@@ -248,7 +232,7 @@
$d = $eventtime['mday'];
$y = $eventtime['year'];
// Display confirmation form
print_side_block_start(get_string('deleteevent', 'calendar').': '.$event->name, array('class' => 'mycalendar'));
print_side_block_start(get_string('deleteevent', 'calendar').': '.$event->name, '', 'mycalendar');
include('event_delete.html');
print_side_block_end();
}
@@ -279,13 +263,7 @@
$form->minutes = '';
}
}
if (!empty($form->courseid)) { // Fixes bug 1488
$course = get_record('course', 'id', $form->courseid);
} else {
$course = $site;
}
print_side_block_start(get_string('editevent', 'calendar'), array('class' => 'mycalendar'));
print_side_block_start(get_string('editevent', 'calendar'), '', 'mycalendar');
include('event_edit.html');
print_side_block_end();
if ($usehtmleditor) {
@@ -415,7 +393,7 @@
$header = ' ('.$header.')';
}
print_side_block_start(get_string('newevent', 'calendar').$header, array('class' => 'mycalendar'));
print_side_block_start(get_string('newevent', 'calendar').$header, '', 'mycalendar');
if($_REQUEST['type'] == 'select') {
$defaultcourse = $SESSION->cal_course_referer;
if(isteacheredit($defaultcourse, $USER->id)) {
@@ -447,7 +425,7 @@
$defaultcourses = calendar_get_default_courses();
calendar_set_filters($courses, $groups, $users, $defaultcourses, $defaultcourses);
print_side_block_start(get_string('monthlyview', 'calendar'));
print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain');
list($prevmon, $prevyr) = calendar_sub_month($mon, $yr);
list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
@@ -530,7 +508,7 @@ function calendar_get_allowed_types(&$allowed) {
$allowed->courses = false; // This may change just below
$allowed->site = isadmin($USER->id);
if(!empty($SESSION->cal_course_referer) && $SESSION->cal_course_referer > 1 && isteacheredit($SESSION->cal_course_referer, $USER->id)) {
if(!empty($SESSION->cal_course_referer) && isteacheredit($SESSION->cal_course_referer, $USER->id)) {
$allowed->courses = array($SESSION->cal_course_referer => 1);
$allowed->groups = get_groups($SESSION->cal_course_referer);
}
+4
View File
@@ -1,3 +1,7 @@
<?php
// The following is a hack to fix bug 1488
$course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
?>
<form method="post" action="event.php" name="edit">
<table cellpadding=5>
<tr>
+105 -131
View File
@@ -130,8 +130,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
// We want to have easy access by day, since the display is on a per-day basis.
// Arguments passed by reference.
//calendar_events_by_day($events, $display->tstart, $eventsbyday, $durationbyday, $typesbyday);
calendar_events_by_day($events, $m, $y, $eventsbyday, $durationbyday, $typesbyday);
calendar_events_by_day($events, $display->tstart, $eventsbyday, $durationbyday, $typesbyday);
$content .= '<table class="calendarmini">'; // Begin table
$content .= '<thead><tr>'; // Header row: day names
@@ -195,7 +194,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
$popupalt = '';
} else if ($event->courseid > 1 and empty($event->groupid)) { // Course event
$popupicon = $CFG->pixpath.'/c/course.gif';
$popupalt = '';
$popupalt = '';
} else if ($event->groupid) { // Group event
$popupicon = $CFG->pixpath.'/c/group.gif';
$popupalt = '';
@@ -203,11 +202,10 @@ 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.'">'.$event->name.'</a></div>';
$popupcontent .= '<div><img height=16 width=16 src=\\\''.$popupicon.'\\\' style=\\\'vertical-align: middle; margin-right: 4px;\\\' alt=\\\''.$popupalt.'\\\' /><a href=\\\''.$dayhref.'\\\'>'.addslashes(htmlspecialchars($event->name)).'</a></div>';
}
$popupcaption = get_string('eventsfor', 'calendar', userdate($events[$eventid]->timestart, $strftimetimedayshort));
$popupcontent = str_replace("'", "\'", htmlspecialchars($popupcontent));
$popup = 'onmouseover="return overlib(\''.$popupcontent.'\', CAPTION, \''.$popupcaption.'\');" onmouseout="return nd();"';
// Class and cell content
@@ -279,12 +277,13 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
$processed = 0;
$now = time(); // We 'll need this later
$usermidnighttoday = usergetmidnight($now);
$nowsecs = $now % SECS_IN_DAY; // this too
$nowdays = $now - $nowsecs; // and this
if ($fromtime) {
$display->tstart = $fromtime;
} else {
$display->tstart = $usermidnighttoday;
$display->tstart = usergetmidnight(time());
}
// This effectively adds as many days as needed, and the final SECS_IN_DAY - 1
@@ -316,27 +315,29 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
if($events !== false) {
foreach($events as $event) {
if($processed >= $display->maxevents) {
break;
}
if($processed >= $display->maxevents) break;
$startdate = usergetdate($event->timestart);
$enddate = usergetdate($event->timestart + $event->timeduration);
$usermidnightstart = usergetmidnight($event->timestart);
$starttimesecs = $event->timestart % SECS_IN_DAY; // Seconds after that day's midnight
$starttimedays = $event->timestart - $starttimesecs; // Timestamp of midnight of that day
if($event->timeduration) {
// To avoid doing the math if one IF is enough :)
$usermidnightend = usergetmidnight($event->timestart + $event->timeduration);
$endtimesecs = ($event->timestart + $event->timeduration) % SECS_IN_DAY; // Seconds after that day's midnight
$endtimedays = ($event->timestart + $event->timeduration) - $endtimesecs; // Timestamp of midnight of that day
}
else {
$usermidnightend = $usermidnightstart;
$endtimesecs = $starttimesecs;
$endtimedays = $starttimedays;
}
// Keep in mind: $starttimeXXX, $endtimeXXX and $nowXXX are all in GMT-based
// OK, now to get a meaningful display...
// First of all we have to construct a human-readable date/time representation
if($event->timestart + $event->timeduration < $now) {
// First of all we have to construct a human-readable date/time representation
if($endtimedays < $nowdays || $endtimedays == $nowdays && $endtimesecs <= $nowsecs) {
// It has expired, so we don't care about duration
$day = calendar_day_representation($event->timestart + $event->timeduration, $now);
$time = calendar_time_representation($event->timestart + $event->timeduration);
@@ -347,8 +348,8 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
}
else if($event->timeduration) {
// It has a duration
if($usermidnightstart == $usermidnightend) {
// But it's all on the same day
if($starttimedays == $endtimedays) {
// But it's all on one day
$day = calendar_day_representation($event->timestart, $now);
$timestart = calendar_time_representation($event->timestart);
$timeend = calendar_time_representation($event->timestart + $event->timeduration);
@@ -449,6 +450,7 @@ function calendar_sql_where($tstart, $tend, $users, $groups, $courses, $withdura
if(is_bool($users) && is_bool($groups) && is_bool($courses)) {
return false;
}
if(is_array($users) && !empty($users)) {
// Events from a number of users
if(!empty($whereclause)) $whereclause .= ' OR';
@@ -464,13 +466,6 @@ function calendar_sql_where($tstart, $tend, $users, $groups, $courses, $withdura
if(!empty($whereclause)) $whereclause .= ' OR';
$whereclause .= ' userid != 0 AND courseid = 0 AND groupid = 0';
}
else if($users === false) {
// No user at all
if(!empty($whereclause)) {
$whereclause .= ' OR';
}
$whereclause .= ' 0';
}
if(is_array($groups) && !empty($groups)) {
// Events from a number of groups
if(!empty($whereclause)) $whereclause .= ' OR';
@@ -486,21 +481,10 @@ function calendar_sql_where($tstart, $tend, $users, $groups, $courses, $withdura
if(!empty($whereclause)) $whereclause .= ' OR ';
$whereclause .= ' groupid != 0';
}
if(is_array($courses)) {
// A number of courses (maybe none at all!)
if(!empty($courses)) {
if(!empty($whereclause)) {
$whereclause .= ' OR';
}
$whereclause .= ' groupid = 0 AND courseid IN ('.implode(',', $courses).')';
}
else {
// This means NO courses, not that we don't care!
if(!empty($whereclause)) {
$whereclause .= ' OR';
}
$whereclause .= ' 0';
}
if(is_array($courses) && !empty($courses)) {
// A number of courses
if(!empty($whereclause)) $whereclause .= ' OR';
$whereclause .= ' groupid = 0 AND courseid IN ('.implode(',', $courses).')';
}
else if(is_numeric($courses)) {
// One course
@@ -532,7 +516,6 @@ function calendar_sql_where($tstart, $tend, $users, $groups, $courses, $withdura
// Just basic time filtering
$whereclause = $timeclause;
}
return $whereclause;
}
@@ -628,11 +611,7 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL) {
$getvars = '&amp;from='.$type;
break;
case 'course':
if (isset($_GET['id'])) {
$getvars = '&amp;from=course&amp;id='.$_GET['id'];
} else {
$getvars = '&amp;from=course';
}
$getvars = '&amp;from=course&amp;id='.$_GET['id'];
if (isset($course->groupmode) and !$course->groupmode and $course->groupmodeforce) {
$groupevents = false;
}
@@ -659,7 +638,7 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL) {
$content .= '<td style="width: 8px;"></td><td><a href="'.CALENDAR_URL.'set.php?var=showcourses'.$getvars.'" title="'.get_string('tt_showcourse', 'calendar').'">'.get_string('courseevents', 'calendar').'</a></td>'."\n";
}
if(!empty($USER) && !isguest($USER->id)) {
if(!isguest($USER->id)) {
$content .= "</tr>\n<tr>";
if($groupevents) {
@@ -705,28 +684,27 @@ function calendar_day_representation($tstamp, $now = false, $usecommonwords = tr
// To have it in one place, if a change is needed
$formal = userdate($tstamp, $shortformat);
$datestamp = usergetdate($tstamp);
$datenow = usergetdate($now);
// Reverse TZ compensation: make GMT stamps correspond to user's TZ
$tzfix = calendar_get_tz_offset();
$tstamp += $tzfix;
$now += $tzfix;
$eventdays = intval($tstamp / SECS_IN_DAY);
$nowdays = intval($now / SECS_IN_DAY);
if($usecommonwords == false) {
// We don't want words, just a date
return $formal;
}
else if($datestamp['year'] == $datenow['year'] && $datestamp['yday'] == $datenow['yday']) {
else if($eventdays == $nowdays) {
// Today
return get_string('today', 'calendar');
}
else if(
($datestamp['year'] == $datenow['year'] && $datestamp['yday'] == $datenow['yday'] - 1 ) ||
($datestamp['year'] == $datenow['year'] - 1 && $datestamp['mday'] == 31 && $datestamp['mon'] == 12 && $datenow['yday'] == 1)
) {
else if($eventdays == $nowdays - 1) {
// Yesterday
return get_string('yesterday', 'calendar');
}
else if(
($datestamp['year'] == $datenow['year'] && $datestamp['yday'] == $datenow['yday'] + 1 ) ||
($datestamp['year'] == $datenow['year'] + 1 && $datenow['mday'] == 31 && $datenow['mon'] == 12 && $datestamp['yday'] == 1)
) {
else if($eventdays == $nowdays + 1) {
// Tomorrow
return get_string('tomorrow', 'calendar');
}
@@ -781,12 +759,23 @@ function calendar_mktime_check($m, $d, $y, $default = false) {
}
}
function calendar_month_name($month) {
if(is_int($month)) {
// 1 ... 12 integer converted to month name
$months = array('january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december');
return get_string($months[$month - 1], 'calendar');
}
else {
return get_string(strtolower($month), 'calendar');
}
}
function calendar_wday_name($englishname) {
return get_string(strtolower($englishname), 'calendar');
}
function calendar_days_in_month($month, $year) {
return intval(date('t', mktime(0, 0, 0, $month, 1, $year)));
return date('t', mktime(0, 0, 0, $month, 1, $year));
}
function calendar_get_sideblock_upcoming($courses, $groups, $users, $daysinfuture, $maxevents) {
@@ -832,7 +821,7 @@ function calendar_sub_month($month, $year) {
}
}
function calendar_events_by_day($events, $month, $year, &$eventsbyday, &$durationbyday, &$typesbyday) {
function calendar_events_by_day($events, $starttime, &$eventsbyday, &$durationbyday, &$typesbyday) {
$eventsbyday = array();
$typesbyday = array();
$durationbyday = array();
@@ -841,66 +830,61 @@ function calendar_events_by_day($events, $month, $year, &$eventsbyday, &$duratio
return;
}
// Reverse TZ compensation: make GMT stamps (from event table) correspond to user's TZ
$tzfix = calendar_get_tz_offset();
foreach($events as $event) {
$eventdaystart = 1 + floor(($event->timestart + $tzfix - $starttime) / SECS_IN_DAY);
$eventdayend = 1 + floor(($event->timestart + $event->timeduration + $tzfix - $starttime) / SECS_IN_DAY);
$startdate = usergetdate($event->timestart);
$enddate = usergetdate($event->timestart + $event->timeduration);
// Give the event to its day
$eventsbyday[$eventdaystart][] = $event->id;
// Simple arithmetic: $year * 13 + $month is a distinct integer for each distinct ($year, $month) pair
if(!($startdate['year'] * 13 + $startdate['mon'] <= $year * 13 + $month) && ($enddate['year'] * 13 + $enddate['mon'] >= $year * 13 + $month)) {
// Out of bounds
continue;
// Mark the day as having such an event
if($event->courseid == 1 && $event->groupid == 0) {
$typesbyday[$eventdaystart]['startglobal'] = true;
}
else if($event->courseid > 1 && $event->groupid == 0) {
$typesbyday[$eventdaystart]['startcourse'] = true;
}
else if($event->groupid) {
$typesbyday[$eventdaystart]['startgroup'] = true;
}
else if($event->userid) {
$typesbyday[$eventdaystart]['startuser'] = true;
}
$eventdaystart = intval($startdate['mday']);
// Mark all days up to and including ending day as duration
if($eventdaystart < $eventdayend) {
if($startdate['mon'] == $month && $startdate['year'] == $year) {
// Give the event to its day
$eventsbyday[$eventdaystart][] = $event->id;
// Normally this should be
// Mark the day as having such an event
if($event->courseid == 1 && $event->groupid == 0) {
$typesbyday[$eventdaystart]['startglobal'] = true;
}
else if($event->courseid > 1 && $event->groupid == 0) {
$typesbyday[$eventdaystart]['startcourse'] = true;
}
else if($event->groupid) {
$typesbyday[$eventdaystart]['startgroup'] = true;
}
else if($event->userid) {
$typesbyday[$eventdaystart]['startuser'] = true;
// $bound = min($eventdayend, $display->maxdays);
// for($i = $eventdaystart + 1; $i <= $bound; ++$i) {
// So that we don't go on marking days after the end of
// the month if the event continues. However, this code
// has moved and now we don't have access to $display->maxdays.
// In order to save the overhead of recomputing it, we just
// use this "dumb" approach. Anyway, the function that called
// us already knows up to what day it should display.
for($i = $eventdaystart + 1; $i <= $eventdayend; ++$i) {
$durationbyday[$i][] = $event->id;
if($event->courseid == 1 && $event->groupid == 0) {
$typesbyday[$i]['durationglobal'] = true;
}
else if($event->courseid > 1 && $event->groupid == 0) {
$typesbyday[$i]['durationcourse'] = true;
}
else if($event->groupid) {
$typesbyday[$i]['durationgroup'] = true;
}
else if($event->userid) {
$typesbyday[$i]['durationuser'] = true;
}
}
}
if($event->timeduration == 0) {
// Proceed with the next
continue;
}
// The event starts on $month $year or before. So...
$lowerbound = $startdate['mon'] == $month && $startdate['year'] == $year ? intval($startdate['mday']) : 0;
// Also, it ends on $month $year or later...
$upperbound = $enddate['mon'] == $month && $enddate['year'] == $year ? intval($enddate['mday']) : calendar_days_in_month($month, $year);
// Mark all days between $lowerbound and $upperbound (inclusive) as duration
for($i = $lowerbound + 1; $i <= $upperbound; ++$i) {
$durationbyday[$i][] = $event->id;
if($event->courseid == 1 && $event->groupid == 0) {
$typesbyday[$i]['durationglobal'] = true;
}
else if($event->courseid > 1 && $event->groupid == 0) {
$typesbyday[$i]['durationcourse'] = true;
}
else if($event->groupid) {
$typesbyday[$i]['durationgroup'] = true;
}
else if($event->userid) {
$typesbyday[$i]['durationuser'] = true;
}
}
}
return;
}
@@ -938,21 +922,11 @@ function calendar_session_vars() {
$SESSION->cal_show_course = true;
}
if(!isset($SESSION->cal_show_user)) {
$SESSION->cal_show_user = true;
$SESSION->cal_show_user = isset($USER->id) ? $USER->id : false;
}
if(empty($SESSION->cal_courses_shown)) {
$SESSION->cal_courses_shown = calendar_get_default_courses(true);
}
if(empty($SESSION->cal_users_shown)) {
// The empty() instead of !isset() here makes a whole world of difference,
// as it will automatically change to the user's id when the user first logs
// in. With !isset(), it would never do that.
$SESSION->cal_users_shown = isset($USER->id) ? $USER->id : false;
}
else if(is_numeric($SESSION->cal_users_shown) && !empty($USER->id) && $SESSION->cal_users_shown != $USER->id) {
// Follow the white rabbit, for example if a teacher logs in as a student
$SESSION->cal_users_shown = $USER->id;
}
}
function calendar_overlib_html() {
@@ -1013,8 +987,12 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
}
if($SESSION->cal_show_user || $ignorefilters) {
// This doesn't work for arrays yet (maybe someday it will)
$user = $SESSION->cal_users_shown;
// This ignores the "which user to see" setting
// The functionality to do that does exist, but this was
// the most painless way to solve bug 1323. And anyway,
// it wasn't being used anywhere.
$user = $USER->id;
//$user = $SESSION->cal_show_user;
}
else {
$user = false;
@@ -1032,7 +1010,7 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
// For each course...
foreach($groupcourses as $courseid) {
// If the user is an editing teacher in there,
if(!empty($USER->id) && isteacheredit($courseid, $USER->id)) {
if(isteacheredit($courseid, $USER->id)) {
// Show events from all groups
if(($grouprecords = get_groups($courseid)) !== false) {
$grouparray = array_merge($grouparray, array_keys($grouprecords));
@@ -1058,10 +1036,6 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
function calendar_edit_event_allowed($event) {
global $USER;
if(empty($USER) || isguest($USER->id)) {
return false;
}
if (isadmin($USER->id)) return true; // Admins are allowed anything
if ($event->courseid > 1) {
@@ -1098,7 +1072,7 @@ function calendar_get_default_courses($ignoreref = false) {
}
$courses = array();
if(!empty($USER->id) && isadmin($USER->id)) {
if(isadmin($USER->id)) {
$courses = get_records_sql('SELECT id, 1 FROM '.$CFG->prefix.'course');
return $courses;
}
@@ -1158,7 +1132,7 @@ function calendar_preferences_button() {
global $CFG, $USER;
// Guests have no preferences
if (empty($USER->id) || isguest()) {
if (empty($USER->id) or isguest()) {
return '';
}
+4 -3
View File
@@ -1,8 +1,9 @@
<?PHP // $Id$
// preferences.php - user prefs for calendar
require_once('../config.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require("../config.php");
require_once('lib.php');
if (isset($SESSION->cal_course_referer)) {
if (! $course = get_record("course", "id", $SESSION->cal_course_referer)) {
@@ -16,7 +17,7 @@
/// If data submitted, then process and store.
if ($form = data_submitted()) {
if ($form = data_submitted()) {
print_header();
foreach ($form as $preference => $value) {
switch ($preference) {
+9 -5
View File
@@ -39,7 +39,9 @@
/////////////////////////////////////////////////////////////////////////////
require_once('../config.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require_once('lib.php');
require_login();
require_variable($_GET['from']);
require_variable($_GET['var']);
@@ -50,9 +52,6 @@
optional_variable($_GET['cal_y']);
switch($_GET['var']) {
case 'setuser':
// Not implemented yet (or possibly at all)
break;
case 'setcourse':
$id = intval($_GET['id']);
if($id == 0) {
@@ -86,7 +85,12 @@
$SESSION->cal_show_global = !$SESSION->cal_show_global;
break;
case 'showuser':
$SESSION->cal_show_user = !$SESSION->cal_show_user;
if($SESSION->cal_show_user) {
$SESSION->cal_show_user = false;
}
else {
$SESSION->cal_show_user = $USER->id;
}
break;
}
+24 -39
View File
@@ -41,8 +41,11 @@
// Display the calendar page.
require_once('../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require_once('../course/lib.php');
require_login();
require_once('lib.php');
optional_variable($_GET['view'], 'upcoming');
optional_variable($_GET['course'], 0);
@@ -92,20 +95,12 @@
// If a course has been supplied in the URL, change the filters to show that one
if(!empty($_GET['course'])) {
if(is_numeric($_GET['course']) && $_GET['course'] > 0 && record_exists('course', 'id', $_GET['course'])) {
if($_GET['course'] == 1) {
// If coming from the home page, show all courses
$SESSION->cal_courses_shown = calendar_get_default_courses(true);
calendar_set_referring_course(0);
}
else {
// Otherwise show just this one
$SESSION->cal_courses_shown = intval($_GET['course']);
calendar_set_referring_course($SESSION->cal_courses_shown);
}
$SESSION->cal_courses_shown = intval($_GET['course']);
calendar_set_referring_course($SESSION->cal_courses_shown);
}
}
if(empty($USER) || isguest($USER->id)) {
if(isguest($USER->id)) {
$defaultcourses = calendar_get_default_courses();
calendar_set_filters($courses, $groups, $users, $defaultcourses, $defaultcourses);
}
@@ -117,8 +112,7 @@
// but NOT for the "main page" course
if($SESSION->cal_course_referer > 1 &&
($shortname = get_field('course', 'shortname', 'id', $SESSION->cal_course_referer)) !== false) {
// If we know about the referring course, show a return link and ALSO require login!
require_login();
// If we know about the referring course, show a return link
$nav = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$SESSION->cal_course_referer.'">'.$shortname.'</a> -> '.$nav;
}
@@ -157,7 +151,7 @@
// START: Last column (3-month display)
echo '<td style="vertical-align: top; width: 180px;">';
print_side_block_start(get_string('monthlyview', 'calendar'));
print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain');
list($prevmon, $prevyr) = calendar_sub_month($mon, $yr);
list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
$getvars = 'cal_d='.$day.'&amp;cal_m='.$mon.'&amp;cal_y='.$yr; // For filtering
@@ -183,7 +177,7 @@
function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
global $CFG, $THEME, $USER;
global $CFG, $THEME, $db;
if (!checkdate($m, $d, $y)) {
$now = usergetdate(time());
@@ -198,8 +192,9 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
$events = calendar_get_upcoming($courses, $groups, $users, 1, 100, $starttime);
// New event button
if (empty($USER) || isguest()) {
if (isguest()) {
$text = get_string('dayview', 'calendar').': '.calendar_course_filter_selector($getvars);
} else {
$text = '<div style="float: left;">'.get_string('dayview', 'calendar').': '.
calendar_course_filter_selector($getvars).'</div><div style="float: right;">';
@@ -212,7 +207,7 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
$text.= '</form></div>';
}
print_side_block_start($text, array('class' => 'mycalendar'));
print_side_block_start($text, '', 'mycalendar');
echo '<p>'.calendar_top_controls('day', array('d' => $d, 'm' => $m, 'y' => $y)).'</p>';
if (empty($events)) {
@@ -226,16 +221,6 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
// First, print details about events that start today
foreach ($events as $event) {
if ($event->timestart >= $starttime && $event->timestart <= $endtime) { // Print it now
/*
print_object($event->time);
$dayend = calendar_day_representation($event->timestart + $event->timeduration);
$timeend = calendar_time_representation($event->timestart + $event->timeduration);
$enddate = usergetdate($event->timestart + $event->timeduration);
// Set printable representation
echo calendar_get_link_tag($dayend, CALENDAR_URL.'view.php?view=day'.$morehref.'&amp;', $enddate['mday'], $enddate['mon'], $enddate['year']).' ('.$timeend.')';
*/
unset($event->time);
calendar_print_event($event);
@@ -315,10 +300,10 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
}
// Extract information: events vs. time
calendar_events_by_day($events, $m, $y, $eventsbyday, $durationbyday, $typesbyday);
calendar_events_by_day($events, $display->tstart, $eventsbyday, $durationbyday, $typesbyday);
// New event button
if(empty($USER) || isguest()) {
if(isguest()) {
$text = get_string('detailedmonthview', 'calendar').': '.calendar_course_filter_selector($getvars);
}
else {
@@ -331,7 +316,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
$text.= '</form></div>';
}
print_side_block_start($text, array('class' => 'mycalendar'));
print_side_block_start($text, '', 'mycalendar');
echo calendar_top_controls('month', array('m' => $m, 'y' => $y));
@@ -481,7 +466,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
echo "</tr>\n";
if(!empty($USER) && !isguest($USER->id)) {
if(!isguest($USER->id)) {
echo '<tr>';
// Group events
if($SESSION->cal_show_groups) {
@@ -513,7 +498,7 @@ function calendar_show_upcoming_events($courses, $groups, $users, $futuredays, $
$events = calendar_get_upcoming($courses, $groups, $users, $futuredays, $maxevents);
// New event button
if(empty($USER) || isguest()) {
if(isguest()) {
$text = get_string('upcomingevents', 'calendar').': '.calendar_course_filter_selector('from=upcoming');
} else {
@@ -528,7 +513,7 @@ function calendar_show_upcoming_events($courses, $groups, $users, $futuredays, $
$text.= '</form></div>';
}
print_side_block_start($text, array('class' => 'mycalendar'));
print_side_block_start($text, '', 'mycalendar');
if ($events) {
foreach ($events as $event) {
calendar_print_event($event);
@@ -577,11 +562,11 @@ function calendar_print_event($event) {
if (calendar_edit_event_allowed($event)) {
echo '<div align="right">';
if (empty($event->cmid)) {
$editlink = CALENDAR_URL.'event.php?action=edit&amp;id='.$event->id;
$editlink = CALENDAR_URL.'event.php?action=edit&amp;id='.$event->id;
$deletelink = CALENDAR_URL.'event.php?action=delete&amp;id='.$event->id;
} else {
$editlink = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&amp;return=true';
$deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid;
$editlink = "$CFG->wwwroot/mod/$event->modulename/view.php?id=$event->cmid";
$deletelink = "$CFG->wwwroot/course/mod.php?delete=$event->cmid";
}
echo ' <a href="'.$editlink.'"><img
src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"
@@ -599,7 +584,7 @@ function calendar_print_event($event) {
function calendar_course_filter_selector($getvars = '') {
global $USER, $SESSION;
if (empty($USER) || isguest($USER->id)) {
if (isguest($USER->id)) {
return '';
}
-6
View File
@@ -161,12 +161,6 @@ $CFG->admin = 'admin';
// most likely doesn't work yet. THIS IS FOR DEVELOPERS ONLY, IT IS
// NOT RECOMMENDED FOR PRODUCTION SITES
// $CFG->unicode = true;
//
// Turning this on will make Moodle use a https connection just for the
// login page (providing a secure login), and then afterwards revert
// back to the normal http URL. Requires https to be enabled on the
// web server.
// $CFG->loginhttps = true;
+7 -15
View File
@@ -57,14 +57,7 @@
/// Resort the category if requested
if (!empty($_GET['resort'])) {
if ($courses = get_courses($category->id, "fullname ASC")) {
$count = 0;
foreach ($courses as $course) {
set_field('course', 'sortorder', $count, 'id', $course->id);
$count++;
}
fix_course_sortorder();
}
fix_course_sortorder($category->id, "fullname ASC");
}
}
@@ -80,16 +73,16 @@
if ($creatorediting) {
if ($adminediting) {
print_header("$site->shortname: $category->name", "$site->fullname: $strcourses",
print_header("$site->shortname: $category->name", "$site->fullname: $strcourses",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> $category->name",
"", "", true, $navbaritem);
} else {
print_header("$site->shortname: $category->name", "$site->fullname: $strcourses",
print_header("$site->shortname: $category->name", "$site->fullname: $strcourses",
"<a href=\"index.php\">$strcategories</a> -> $category->name", "", "", true, $navbaritem);
}
} else {
print_header("$site->shortname: $category->name", "$site->fullname: $strcourses",
print_header("$site->shortname: $category->name", "$site->fullname: $strcourses",
"<a href=\"index.php\">$strcategories</a> -> $category->name", "", "", true, $navbaritem);
}
@@ -133,7 +126,8 @@
if (!set_field("course", "category", $destcategory->id, "id", $course->id)) {
notify("An error occurred - course not moved!");
}
fix_course_sortorder();
fix_course_sortorder($destcategory->id);
fix_course_sortorder($category->id);
$category = get_record("course_categories", "id", $category->id);
}
}
@@ -208,7 +202,7 @@
}
}
fix_course_sortorder();
fix_course_sortorder($category->id);
} // End of editing stuff
@@ -236,8 +230,6 @@
/// Print out all the courses
unset($course); // To avoid unwanted language effects later
$courses = get_courses_page($category->id, "c.sortorder ASC", "c.*", $totalcount, $page*$perpage, $perpage);
$numcourses = count($courses);
-35
View File
@@ -12,9 +12,6 @@
if (!isset($form->lang)) {
$form->lang = '';
}
if (!isset($form->enrolperiod)) {
$form->enrolperiod = 0;
}
?>
<FORM METHOD="post" action="edit.php" NAME="form">
<table cellpadding=9 cellspacing=0 >
@@ -43,13 +40,6 @@
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign=top>
<td align="right"><P><?php print_string("idnumber") ?>:</td>
<td><input type="text" name="idnumber" maxlength="100" size="10" value="<?php p($form->idnumber) ?>">
<?php helpbutton("courseidnumber", get_string("idnumber")) ?>
<?php if (isset($err["idnumber"])) formerr($err["idnumber"]); ?>
</td>
</tr>
<tr valign=top>
<td align="right"><P><?php print_string("summary") ?>:</td>
<td><?php
@@ -74,20 +64,6 @@
helpbutton("coursestartdate", get_string("startdate"));
?></td>
</tr>
<tr valign=top>
<td align="right"><P><?php print_string("enrolperiod") ?>:</td>
<td>
<?php
$periodmenu[0] = get_string('unlimited');
for ($i=1; $i<=365; $i++) {
$seconds = $i * 86400;
$periodmenu[$seconds] = get_string('numdays', '', $i);
}
choose_from_menu ($periodmenu, "enrolperiod", "$form->enrolperiod", "");
helpbutton("enrolperiod", get_string("enrolperiod"));
?>
</td>
</tr>
<tr valign=top>
<td align="right"><P><?php print_string("numberweeks") ?>:</td>
<td><?php
@@ -146,17 +122,6 @@
helpbutton("guestaccess", get_string("opentoguests")); ?>
</td>
</tr>
<?php
if ($CFG->enrol != 'internal') {
?>
<tr valign=top>
<td align="right"><P><?php print_string("cost") ?>:</td>
<td><input type="text" name="cost" maxlength="6" size=6 value="<?php p($form->cost) ?>">
</td>
</tr>
<?php
}
?>
<tr valign=top>
<td align="right"><P><?php print_string("hiddensections") ?>:</td>
<td><?php
+11 -13
View File
@@ -1,9 +1,9 @@
<?PHP // $Id$
// Edit course settings
require_once("../config.php");
require_once("lib.php");
require_once("$CFG->libdir/blocklib.php");
require_once("../config.php");
require_once("lib.php");
require_once("$CFG->libdir/blocklib.php");
optional_variable($id, 0); // course id
optional_variable($category, 0); // category id
@@ -36,7 +36,7 @@
/// If data submitted, then process and store.
if ($form = data_submitted()) {
if ($form = data_submitted()) {
check_for_restricted_user($USER->username, "$CFG->wwwroot/course/view.php?id=$course->id");
@@ -51,8 +51,8 @@
if (!empty($course)) {
if (update_record("course", $form)) {
add_to_log($course->id, "course", "update", "edit.php?id=$id", "");
fix_course_sortorder();
redirect("view.php?id=$course->id", get_string("changessaved"));
fix_course_sortorder($form->category);
redirect("view.php?id=$course->id", get_string("changessaved"));
} else {
error("Serious Error! Could not update the course record! (id = $form->id)");
}
@@ -73,7 +73,7 @@
$section->section = 0;
$section->id = insert_record("course_sections", $section);
fix_course_sortorder();
fix_course_sortorder($form->category);
add_to_log($newcourseid, "course", "new", "view.php?id=$newcourseid", "");
if (isadmin()) { // Redirect admin to add teachers
@@ -101,14 +101,14 @@
error("Serious Error! Could not create the new course!");
}
}
die;
die;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
}
/// Otherwise fill and print the form.
@@ -124,8 +124,6 @@
$form->password = "";
$form->guest = 0;
$form->numsections = 10;
$form->idnumber = '';
$form->cost = '';
$form->newsitems = 5;
$form->showgrades = 1;
$form->groupmode = 0;
@@ -169,7 +167,7 @@
$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);
} else {
@@ -180,7 +178,7 @@
print_heading($streditcoursesettings);
print_simple_box_start("center", "", "$THEME->cellheading");
include("edit.html");
include("edit.html");
print_simple_box_end();
print_footer($course);
+96 -23
View File
@@ -1,16 +1,16 @@
<?PHP // $Id$
// Depending on the current enrolment method, this page
// presents the user with whatever they need to know when
// they try to enrol in a course.
// Asks for a course pass key, once only, and enrols that user
require_once("../config.php");
require_once("lib.php");
require_once("$CFG->dirroot/enrol/$CFG->enrol/enrol.php");
require_variable($id);
require_login();
$strloginto = get_string("loginto", "", $course->shortname);
$strcourses = get_string("courses");
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
}
@@ -21,17 +21,57 @@
check_for_restricted_user($USER->username);
$enrol = new enrolment_plugin();
/// Check the submitted enrollment key if there is one
/// Refreshing enrolment data in the USER session
$enrol->get_student_courses($USER);
$enrol->get_teacher_courses($USER);
if ($form = data_submitted()) {
if ($form->password == $course->password) {
if (isguest()) {
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", $_SERVER['REMOTE_ADDR']);
} else if (!record_exists("user_students", "userid", $USER->id, "course", $course->id)) {
if (! enrol_student($USER->id, $course->id)) {
error("An error occurred while trying to enrol you.");
}
$subject = get_string("welcometocourse", "", $course->fullname);
$a->coursename = $course->fullname;
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id";
$message = get_string("welcometocoursetext", "", $a);
if (! $teacher = get_teacher($course->id)) {
$teacher = get_admin();
}
email_to_user($USER, $teacher, $subject, $message);
add_to_log($course->id, "course", "enrol", "view.php?id=$course->id", "$USER->id");
}
$USER->student[$course->id] = true;
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$course->id";
}
redirect($destination);
} else {
$errormsg = get_string("enrolmentkeyhint", "", substr($course->password,0,1));
}
}
/// Double check just in case they are actually enrolled already
/// This might occur if they were enrolled during this session
if ( !empty($USER->student[$course->id]) or !empty($USER->teacher[$course->id]) ) {
/// This might occur if they were manually enrolled during this session
if (record_exists("user_students", "userid", $USER->id, "course", $course->id)) {
$USER->student[$course->id] = true;
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
@@ -39,26 +79,59 @@
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$course->id";
}
redirect($destination);
}
/// Double check just in case they are enrolled to start in the future
if ($student = get_record('user_students', 'userid', $USER->id, 'course', $course->id)) {
$message = get_string('enrolmentnotyet', '', userdate($student->timestart));
print_header();
notice($message, $CFG->wwwroot);
/// Automatically enrol into courses without password
if ($course->password == "") { // no password, so enrol
if (isguest()) {
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", "$USER->id");
} else if (empty($confirm)) {
print_header($strloginto, $course->fullname, "<a href=\".\">$strcourses</a> -> $strloginto");
echo "<br />";
notice_yesno(get_string("enrolmentconfirmation"), "enrol.php?id=$course->id&confirm=1", $CFG->wwwroot);
print_footer();
exit;
} else {
if (! enrol_student($USER->id, $course->id)) {
error("An error occurred while trying to enrol you.");
}
add_to_log($course->id, "course", "enrol", "view.php?id=$course->id", "$USER->id");
$USER->student[$course->id] = true;
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$course->id";
}
redirect($destination);
}
}
/// Check the submitted enrollment key if there is one
if ($form = data_submitted()) {
$enrol->check_entry($form, $course);
$teacher = get_teacher($course->id);
if (!isset($password)) {
$password = "";
}
$enrol->print_entry($course);
/// Easy!
print_header($strloginto, $course->fullname, "<A HREF=\".\">$strcourses</A> -> $strloginto", "form.password");
print_course($course);
include("enrol.html");
print_footer();
?>
+1 -1
View File
@@ -57,7 +57,7 @@
echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
print_course_blocks($course, $rightblocks, BLOCK_RIGHT);
if ($editing && !empty($missingblocks)) {
block_print_blocks_admin($course, $missingblocks);
block_print_blocks_admin($course->id, $missingblocks);
}
print_spacer(1, 120, true);
echo '</td>';
+12 -6
View File
@@ -98,7 +98,7 @@
$thissection = $sections[$section];
if ($thissection->summary or $thissection->sequence or isediting($course->id)) {
echo '<tr id="section_0">';
echo "<tr>";
echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=top width=20>&nbsp;</td>";
echo "<td valign=top bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\" width=\"100%\">";
@@ -115,7 +115,10 @@
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
print_section_add_menus($course, $section, $modnames);
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...", "mods", $stractivities);
echo "</div>";
}
echo "</td>";
@@ -187,11 +190,11 @@
echo "</td>";
if (!isteacher($course->id) and !$thissection->visible) { // Hidden for students
echo '<td id="section_'.($section).'" style="vertical-align:top; text-align: center; width: 100%;" '.$colormain.'>';
echo "<td valign=top align=center $colormain width=\"100%\">";
echo get_string("notavailable");
echo "</td>";
} else {
echo '<td id="section_'.($section).'" style="vertical-align:top; width: 100%;" '.$colormain.'>';
echo "<td valign=top $colormain width=\"100%\">";
echo format_text($thissection->summary, FORMAT_HTML);
@@ -205,7 +208,10 @@
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
print_section_add_menus($course, $section, $modnames);
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...");
echo "</div>";
}
echo "</td>";
@@ -275,7 +281,7 @@
echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
print_course_blocks($course, $rightblocks, BLOCK_RIGHT);
if ($editing && !empty($missingblocks)) {
block_print_blocks_admin($course, $missingblocks);
block_print_blocks_admin($course->id, $missingblocks);
}
print_spacer(1, 120, true);
echo '</td>';
+9 -3
View File
@@ -104,7 +104,10 @@
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
print_section_add_menus($course, $section, $modnames);
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...", "mods", $stractivities);
echo "</div>";
}
echo "</td>";
@@ -198,7 +201,10 @@
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
print_section_add_menus($course, $section, $modnames);
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...");
echo "</div>";
}
echo "</td>";
@@ -261,7 +267,7 @@
echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
print_course_blocks($course, $rightblocks, BLOCK_RIGHT);
if ($editing && !empty($missingblocks)) {
block_print_blocks_admin($course, $missingblocks);
block_print_blocks_admin($course->id, $missingblocks);
}
print_spacer(1, 120, true);
echo '</td>';
+9 -5
View File
@@ -2,8 +2,8 @@
// For most people, just lists the course categories
// Allows the admin to create, delete and rename course categories
require_once("../config.php");
require_once("lib.php");
require_once("../config.php");
require_once("lib.php");
if (!$site = get_site()) {
error("Site isn't defined!");
@@ -76,7 +76,7 @@
$straction = get_string("action");
$straddnewcategory = get_string("addnewcategory");
print_header("$site->shortname: $strcategories", "$site->fullname",
print_header("$site->shortname: $strcategories", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strcategories",
"addform.addcategory", "", true, update_categories_button());
@@ -231,6 +231,7 @@
$categories = get_categories();
$default = 99999;
foreach ($categories as $category) {
fix_course_sortorder($category->id);
if ($category->id < $default) {
$default = $category->id;
}
@@ -238,14 +239,17 @@
/// Find any orphan courses that don't yet have a valid category and set to default
if ($courses = get_courses()) {
$foundorphans = false;
foreach ($courses as $course) {
if ($course->category and !isset($categories[$course->category])) {
set_field("course", "category", $default, "id", $course->id);
$foundorphans = true;
}
}
if ($foundorphans) {
fix_course_sortorder($default);
}
}
fix_course_sortorder();
/// Print form for creating new categories
+1 -1
View File
@@ -59,7 +59,7 @@
}
echo "$teacher->role: ";
link_to_popup_window ("/user/view.php?id=$teacher->id&course=$site->id", "opener",
fullname($teacher), 400, 500, "$teacher->role",
"$teacher->firstname $teacher->lastname", 400, 500, "$teacher->role",
"");
echo "<br />";
}
+458 -241
View File
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -5,7 +5,6 @@
require_once("lib.php");
require_variable($id); // Course ID
optional_variable($group, -1); // Group to display
optional_variable($user, 0); // User to display
optional_variable($date, 0); // Date to display
optional_variable($modname, ""); // course_module->id
@@ -60,11 +59,11 @@
print_heading("$course->fullname: $userinfo, $dateinfo (".usertimezone().")");
print_log_selector_form($course, $user, $date, $modname, $modid, $modaction, $group);
print_log_selector_form($course, $user, $date, $modname, $modid, $modaction);
print_log($course, $user, $date, "l.time DESC", $page, $perpage,
"log.php?id=$course->id&chooselog=1&user=$user&date=$date&modid=$modid&modaction=$modaction&group=$group",
$modname, $modid, $modaction, $group);
"log.php?id=$course->id&chooselog=1&user=$user&date=$date&modid=$modid&modaction=$modaction",
$modname, $modid, $modaction);
} else {
if ($course->category) {
+2 -64
View File
@@ -1,6 +1,6 @@
<?PHP // $Id$
// Moves, adds, updates, duplicates or deletes modules in a course
// Moves, adds, updates or deletes modules in a course
require("../config.php");
require("lib.php");
@@ -60,9 +60,6 @@
if (is_string($return)) {
error($return, "view.php?id=$course->id");
}
$SESSION->returnpage = "$CFG->wwwroot/mod/$mod->modulename/view.php?id=$mod->coursemodule";
add_to_log($course->id, "course", "update mod",
"../mod/$mod->modulename/view.php?id=$mod->coursemodule",
"$mod->modulename $mod->instance");
@@ -107,9 +104,6 @@
if (! set_field("course_modules", "section", $sectionid, "id", $mod->coursemodule)) {
error("Could not update the course module with the correct section");
}
$SESSION->returnpage = "$CFG->wwwroot/mod/$mod->modulename/view.php?id=$mod->coursemodule";
add_to_log($course->id, "course", "add mod",
"../mod/$mod->modulename/view.php?id=$mod->coursemodule",
"$mod->modulename $mod->instance");
@@ -117,7 +111,6 @@
"view.php?id=$mod->coursemodule",
"$mod->instance", $mod->coursemodule);
break;
case "delete":
if (! $deleteinstancefunction($mod->instance)) {
notify("Could not delete the $mod->modulename (instance)");
@@ -463,57 +456,6 @@
$pageheading = get_string("updatinga", "moodle", $fullmodulename);
}
} else if (isset($_GET['duplicate'])) { // value = course module
if (! $cm = get_record("course_modules", "id", $_GET['duplicate'])) {
error("This course module doesn't exist");
}
if (! $course = get_record("course", "id", $cm->course)) {
error("This course doesn't exist");
}
if (!isteacheredit($course->id)) {
error("You can't modify this course!");
}
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
if (! $form = get_record($module->name, "id", $cm->instance)) {
error("The required instance of this module doesn't exist");
}
if (! $cw = get_record("course_sections", "id", $cm->section)) {
error("This course section doesn't exist");
}
if (isset($return)) {
$SESSION->returnpage = "$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id";
}
$section = get_field('course_sections', 'section', 'id', $cm->section);
$form->coursemodule = $cm->id;
$form->section = $section; // The section ID
$form->course = $course->id;
$form->module = $module->id;
$form->modulename = $module->name;
$form->instance = $cm->instance;
$form->mode = "add";
$sectionname = get_string("name$course->format");
$fullmodulename = strtolower(get_string("modulename", $module->name));
if ($form->section) {
$heading->what = $fullmodulename;
$heading->in = "$sectionname $cw->section";
$pageheading = get_string("duplicatingain", "moodle", $heading);
} else {
$pageheading = get_string("duplicatinga", "moodle", $fullmodulename);
}
} else if (isset($_GET['add'])) {
@@ -540,9 +482,6 @@
$form->instance = "";
$form->coursemodule = "";
$form->mode = "add";
if (isset($_GET['type'])) {
$form->type = $_GET['type'];
}
$sectionname = get_string("name$course->format");
$fullmodulename = get_string("modulename", $module->name);
@@ -590,7 +529,6 @@
if ($usehtmleditor = can_use_html_editor()) {
$defaultformat = FORMAT_HTML;
$editorfields = '';
} else {
$defaultformat = FORMAT_MOODLE;
}
@@ -603,7 +541,7 @@
print_simple_box_end();
if ($usehtmleditor and empty($nohtmleditorneeded)) {
use_html_editor($editorfields);
use_html_editor();
}
} else {
-365
View File
@@ -1,365 +0,0 @@
<?PHP // $Id$
// Displays all activity for non-quiz modules for a course
///This version allows students to see their own activity, but not that of others.
///For teachers only, clicking on a student's name brings up the Moodle user activity summary.
require_once("../config.php");
require_once("lib.php");
require_once("../lib/datalib.php");
//module, location of user data,pointer
$quick_dataloc["assignment"] = array("assignment_submissions","assignment");
$quick_dataloc["choice"] = array("choice_answers","choice");
$quick_dataloc["dialogue"] = array("dialogue_entries","dialogue");
$quick_dataloc["discussion"] = array("forum_posts","discussion");
$quick_dataloc["journal"] = array("journal_entries","journal");
$quick_dataloc["quiz"] = array("quiz_attempts","quiz");
$quick_dataloc["survey"] = array("survey_analysis","survey");
$quick_dataloc["workshop"] = array("workshop_submissions","workshopid");
$usemods = ",assignment,choice,dialogue,forum,journal,quiz,survey,workshop";
$modlist = get_records("modules","visible",1);
foreach ($modlist as $nowmod){
if (strpos($usemods,$nowmod->name)){
$modnames[$nowmod->id] = $nowmod->name;
}
}
//needed for cases when a particular module type needs special treatment (assignment,forum)
$modname_value = array_flip($modnames);
require_variable($id); // course id
optional_variable($download, ""); // to download data
require_login();
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
}
//take each event and create an array type/event/user hierarchy
//we need to get the entire list of enrolled students for the course so that we can list by student
if (isteacher($course->id)) {
$isstudent = 0;
} elseif (isstudent($course->id)) {
$isstudent = 1;
} else {
error("You are not registered for this course");
}
$courseid = $course->id;
//Get the ids of all course users
$allusers = quick_findusers($course->id);
//Get all postings from this course's users
$allposts = quick_findposts($course->id);
//count posts per user by looping thru $allposts and put counts in $post_counts
foreach ($allposts as $thispost){
$post_counts[$thispost->forumid][$thispost->userid]++;
}
$allmods = quick_moduleorder($course->id);
//Now take all mods and build an object $mod_info for only those modules that will be reported
//Concurrently build a $mods_week array that says how many columns will be in the header per week
$modcount = -1;
foreach($allmods as $thismod){
$modcount++;
//get the info on this module from course_modules
$nowmod = get_record("course_modules","id",$thismod[mod]);
$noworder = get_record("course_sections","id",$nowmod->section);
//only add to array the module is contained in the $modnames array
if ($modnames[$nowmod->module]){
//section is the entry in course_sections which says which instances
///reside in the section and which week/section they are in
$mod_info[$modcount][section] = $nowmod->section;
//module is the type of module (assignment, forum, etc.)
$mod_info[$modcount][module] = $nowmod->module;
//modid is the id of the module in "course_modules" table
$mod_info[$modcount][modid] = $nowmod->id;
//week is the current week/section that the module resides in
$mod_info[$modcount][week] = $noworder->section;
//instance in the relevant module table will yield the name
$mod_info[$modcount][instance] = $nowmod->instance;
//Count how many instances in each week for colspan purposes
if ($mods_week[$noworder->section]){
$mods_week[$noworder->section]++;
} else {
$mods_week[$noworder->section] = 1;
}
//Now add the name of the module to $mods_info
$mod_info[$modcount][name] = get_field($modnames[$nowmod->module],"name","id",$nowmod->instance);
} else {
$modcount--;
}
}
//Catalog by user all activity for every module
//This will include modules to be ignored later, but it is easier this way
//Data for each user can be retrieved by matching$rec->name with $mod_info name(created above)
//Create a comma-delimited string in $user_data with the IDs of each user in an array of mod type(module) + modid
foreach ($modnames as $nowtype => $nowname){
$now_module = $nowname;
$now_user_table = $quick_dataloc[$now_module][0]; //name of table containing individual user records
$now_pointer = $quick_dataloc[$now_module][1]; // the field in above with pointer to table with name of activity
// Now set up a table for each separate instance of the module with a listing of the users
$allrecs = quick_findrecs($now_module,$now_user_table,$now_pointer,$course->id);
if ($allrecs) {
foreach ($allrecs as $rec){
$np = $rec->instance;
if ($nowname == "assignment"){
// For assignments, a record is created for all students when the assmt is created
//the timemodified is 0 until the student submits an assignment
if ($rec->timemodified != 0) {
$user_data[$nowtype][$np] = $user_data[$nowtype][$np] . ",$rec->userid,";
}
} else {
$user_data[$nowtype][$np] = $user_data[$nowtype][$np] . ",$rec->userid,";
}
}
}
}
if ($allposts) {
foreach ($allposts as $rec){
$forumval = $modname_value["forum"];
$user_data[$forumval][$rec->forumid] = $user_data[$forumval][$rec->forumid] . ",$rec->userid,";
// echo "<br>" . $rec->forumid . $rec->name . "<br>";
}
}
//now go through the $mod_info array in order of the users, and find whether each user contributed, put in $user_contribs
foreach($allusers as $user){
$uid = $user->id;
foreach ($mod_info as $thismod){
if(strlen($user_data[$thismod[module]][$thismod[instance]]) < 2){
$user_contribs[$uid][] = "-";
continue;
}
//For forums count the number of contributions. For others, just "x" or "-";
if ($thismod[module] == $modname_value["forum"]) {
$puid = $post_counts[$uid];
if ($post_counts[$thismod[instance]][$uid] > 0){
$user_contribs[$uid][] = $post_counts[$thismod[instance]][$uid];
} else {
$user_contribs[$uid][] = "-";
}
} else {
//see if "comma+userid+comma " exists
$sstring = ",$user->id,";
if(strpos($user_data[$thismod[module]][$thismod[instance]],$sstring)> -1){
$user_contribs[$uid][] = "X";
}else {
$user_contribs[$uid][] = "-";
}
}
}
}
//if Excel spreadsheet requested
if ($download == "xls") {
require_once("$CFG->libdir/excel/Worksheet.php");
require_once("$CFG->libdir/excel/Workbook.php");
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$course->shortname"."_quickreport.xls");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");
$workbook = new Workbook("-");
// Creating the first worksheet
$myxls = &$workbook->add_worksheet('Quick Report');
$myxls->write_string(0,0,$quiz->name);
$myxls->set_column(0,0,25);
$formaty =& $workbook->add_format();
$formaty->set_bg_color('yellow');
$formatyc =& $workbook->add_format();
$formatyc->set_bg_color('yellow');
$formatyc->set_bold(1);
$formatyc->set_align('center');
$formatc =& $workbook->add_format();
$formatc->set_align('center');
$formatb =& $workbook->add_format();
$formatb->set_bold(1);
$row = 1;
$col = 2;
/// Print names of all the fields
///First labels to show week/section
if ($course->format == "weeks") {$formatname = "Week";} else {$formatname = "Section";}
foreach($mods_week as $week=>$wkcount){
for ($i = 0; $i < $wkcount;$i++) {
$col++;
$col_label = "$formatname $week";
$myxls->write_string($row,$col,$col_label,$formatb);
}
}
//now labels for module names
$row++;
$col=0;
$myxls->write_string($row,$col,"Student",$formatb);
$col++;
$myxls->write_string($row,$col,"Picture",$formatb);
$col++;
$myxls->write_string($row,$col,"Profile",$formatb);
//get the names of each module instance and put in header
foreach($mod_info as $thiscat=>$thismod){
$modname = ucwords($modnames[$thismod[module]]);
$col++;
$col_label = "$modname $thismod[name]";
$myxls->write_string($row,$col,$col_label,$formatb);
}
/// Print all the user data
$row++;
foreach ($user_contribs as $userid=>$thisuser){
$row++;
$col=0;
$fullname = ucwords($allusers[$userid]->lastname) . ", " . ucwords($allusers[$userid]->firstname);
$myxls->write_string($row,$col,$fullname,$formatb);
$col++;
if($allusers[$userid]->picture){
$myxls->write_string($row,$col,"X",$formatc);
} else {
$myxls->write_string($row,$col,"-",$formatc);
}
$col++;
if (strlen($allusers[$userid]->description) > 10) {
$myxls->write_string($row,$col,"X",$formatc);
} else {
$myxls->write_string($row,$col,"-",$formatc);
}
foreach ($thisuser as $thismod) {
$col++;
$myxls->write_string($row,$col,$thismod,$formatc);
}
}
$workbook->close();
exit;
}
quick_headers($course);
$quick_bgcount = 0;
echo "<table>";
//printer header line with weeks
$options["id"] = $course->id;
$options["download"] = "xls";
print ( "<tr valign=top><td colspan=3>");
print_single_button("quickreport.php", $options, get_string("downloadexcel"));
print ("</td>");
if ($course->format == "weeks") {$formatname = "Week";} else {$formatname = "Section";}
foreach($mods_week as $week=>$wkcount){
print "<td colspan=$wkcount>$formatname $week</td>";
}
echo "<tr valign=top><td width='150'>Student</td><td>Picture</td><td>Profile</td>";
//get the names of each module instance and put in header
foreach($mod_info as $thiscat=>$thismod){
$modname = ucwords($modnames[$thismod[module]]);
print ("<td> $modname <br><font size=-1>$thismod[name]</font></td>");
}
echo "</tr>\n";
foreach ($user_contribs as $userid=>$thisuser){
$quick_bgcount++;
if ($quick_bgcount%3 == 0) {
echo "<tr align=center bgcolor='#ffffff'>";
} else {
echo "<tr align=center>";
}
$fullname = ucwords($allusers[$userid]->lastname) . ", " . ucwords($allusers[$userid]->firstname);
if (!$isstudent){
$fullname = "<a href=user.php?id=$course->id&user=$userid>$fullname</a>";
}
echo "<td align=left><b>$fullname</b></td>";
$picture = print_user_picture($userid, $course->id, $allusers[$userid]->picture, false, true);
echo "<td>" . $picture . "</td>";
if (strlen($allusers[$userid]->description) > 10) {quick_show("X");} else {quick_show("-");}
foreach ($thisuser as $thismod) {
quick_show($thismod);
}
echo "</tr>\n";
}
echo "</table>\n";
print_footer($course);
function quick_findusers($courseid){
global $CFG,$USER,$isstudent;
if ($isstudent){
$studcondition = "AND a.id = $USER->id";
} else {
$studcondition = "";
}
$allusers = get_records_sql("SELECT a.id,a.lastname, a.firstname,a.picture,a.description,b.course
FROM {$CFG->prefix}user a,
{$CFG->prefix}user_students b
WHERE b.course = $courseid AND
b.userid = a.id $studcondition
ORDER BY a.lastname ASC, a.firstname ASC");
return $allusers;
}
function quick_findrecs($tbl1,$tbl2,$pointer,$courseid){
global $CFG;
$allrecs = get_records_sql("SELECT b.id,a.id, c.id,c.lastname, c.firstname,a.course,a.name ,b.userid,b.timemodified, b.$pointer as instance
FROM {$CFG->prefix}$tbl1 a,
{$CFG->prefix}$tbl2 b,
{$CFG->prefix}user c,
{$CFG->prefix}course_modules d
WHERE a.course = $courseid AND
a.id = b.$pointer AND
c.id = b.userid AND
d.instance = b.$pointer");
/// ORDER BY e.section ASC
// print("<h3>All records: $tbl1</h3>");
// print_object($allrecs);
return $allrecs;
}
function quick_findposts($courseid){
global $CFG;
//this will allow records to be identified by Forum but not by thread (no b.id)
$allposts = get_records_sql("SELECT
c.id, c.userid,a.id as forumid,a.name
FROM {$CFG->prefix}forum a,
{$CFG->prefix}forum_discussions b,
{$CFG->prefix}forum_posts c
WHERE b.course = $courseid AND
a.id = b.forum AND
c.discussion = b.id
ORDER BY forumid ASC");
return $allposts;
}
function quick_moduleorder($courseid){
//using course_sections which gives the sections & sequence, build an array with each section + item pair
// echo "<br>Course= " . $courseid . "<br>";
$allmods = get_records("course_sections","course",$courseid,"section","id,section,sequence");
// print_object($allmods);
// $modsequence
foreach ($allmods as $thisweek){
// print_object($thisweek);
if ($thisweek->sequence){
// print ("$thisweek->sequence");
$weeklist = explode(",",$thisweek->sequence);
foreach($weeklist as $activity){
$all_list[] =array("mod"=>$activity,"sec"=>$thisweek->section);
}
// print_object($weeklist);
} else {
// print ("<br>No modules this week<br>");
}
}
return $all_list;
}
function quick_headers($course){
global $CFG;
print_header("$course->shortname: 'Quick Report'", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
-> 'Quick Report'");
}
function quick_show($x){
echo "<td align=center>";
print ("$x");
echo "</td>";
}
?>
+3 -8
View File
@@ -42,7 +42,8 @@
<a href=\"recent.php?id=$course->id\">$strrecentactivity</a> -> $userinfo, $dateinfo", "");
} else {
print_header("$course->shortname: $strrecentactivity", "$course->fullname",
"<a href=\"recent.php?id=$course->id\">$strrecentactivity</a> -> $userinfo, $dateinfo", "");
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> ->
<a href=\"recent.php?id=$course->id\">$strrecentactivity</a> -> $userinfo, $dateinfo", "");
}
print_heading("$course->fullname: $userinfo, $dateinfo (".usertimezone().")");
@@ -66,21 +67,15 @@
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strrecentactivity", "");
} else {
print_header("$course->shortname: $strrecentactivity", "$course->fullname",
"$strrecentactivity", "");
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strrecentactivity", "");
}
print_heading(get_string("activitysince", "", userdate($date)));
if (!isset($advancedfilter)) {
$advancedfilter = 0;
}
print_recent_selector_form($course, $advancedfilter);
}
if (!isset($modid)) {
$modid="activity/All";
}
$tmpmodid = $modid;
switch ($tmpmodid) {
+1 -10
View File
@@ -59,14 +59,7 @@
/// Add a student if one is specified
if (!empty($add)) {
check_for_restricted_user($USER->username, "$CFG->wwwroot/course/student.php?id=$course->id");
if ($course->enrolperiod) {
$timestart = time();
$timeend = $timestart + $course->enrolperiod;
} else {
$timestart = $timeend = 0;
}
if (! enrol_student($add, $course->id, $timestart, $timeend)) {
if (! enrol_student($add, $course->id)) {
error("Could not add that student to this course!");
}
}
@@ -74,7 +67,6 @@
/// Remove a student if one is specified.
if (!empty($remove)) {
check_for_restricted_user($USER->username, "$CFG->wwwroot/course/student.php?id=$course->id");
if (! unenrol_student($remove, $course->id)) {
error("Could not remove that student from this course!");
}
@@ -83,7 +75,6 @@
/// Remove all students from specified course
if (!empty($removeall)) {
check_for_restricted_user($USER->username, "$CFG->wwwroot/course/student.php?id=$course->id");
$students = get_course_students($course->id, "u.lastname ASC, u.firstname ASC");
foreach ($students as $student) {
if (! unenrol_student($student->id, $course->id)) {
+2 -2
View File
@@ -20,8 +20,8 @@
require_login($course->id);
if ($user->id != $USER->id and !isteacheredit($course->id)) {
error("You must be a teacher with editing rights to do this");
if ($user->id != $USER->id and !isteacher($course->id)) {
error("You must be a teacher to do this");
}
if ($user->id == $USER->id and !$CFG->allowunenroll) {
+4 -4
View File
@@ -2,9 +2,9 @@
// Display the course home page.
require_once('../config.php');
require_once('lib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once("../config.php");
require_once("lib.php");
require_once("$CFG->libdir/blocklib.php");
optional_variable($id);
optional_variable($name);
@@ -199,6 +199,6 @@
require("$CFG->dirroot/course/format/$course->format/format.php"); // Include the actual course format
print_footer(NULL, $course);
print_footer();
?>
+1 -13
View File
@@ -1,3 +1,4 @@
body, td, th, li {
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
@@ -116,16 +117,3 @@ ul {
margin-top: 10px;
}
.commandline {
font-family: "Courier New", Courier, mono;
font-size: x-small;
background-color: #FBFBFB;
margin: auto auto 20px 30px;
padding: 5px;
width: compact;
font-weight: bold;
border: 1px solid #999999;
white-space: nowrap;
clear: both;
float: none;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

-15
View File
@@ -1,15 +0,0 @@
ENROLMENT MODULES
-----------------
(Yes, that's the correct English spelling ;-) )
enrol.class.php contains the base class and explains
all the possible functions that an enrolment module
can have.
Each plugin is in a subfolder here and extends the
base class as necessary.
Martin Dougiamas and Shane Elliott, Moodle.com
-324
View File
@@ -1,324 +0,0 @@
<?php /// $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.org //
// //
// Copyright (C) 2004 Martin Dougiamas http://moodle.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/**
* enrolment_base is the base class for enrolment plugins
*
* This class provides all the functionality for an enrolment plugin
* In fact it includes all the code for the default, "internal" method
* so that other plugins can override these as necessary.
*/
class enrolment_base {
var $errormsg;
/**
* Returns information about the courses a student has access to
*
* Set the $user->student course array
* Set the $user->timeaccess course array
*
* @param user referenced object, must contain $user->id already set
*/
function get_student_courses(&$user) {
if ($students = get_records("user_students", "userid", $user->id)) {
$currenttime = time();
foreach ($students as $student) {
/// Is course visible?
if (get_field("course", "visible", "id", $student->course)) {
/// Is the student enrolment active right now?
if ( ( $student->timestart == 0 or ( $currenttime > $student->timestart )) and
( $student->timeend == 0 or ( $currenttime < $student->timeend )) ) {
$user->student[$student->course] = true;
$user->timeaccess[$student->course] = $student->timeaccess;
}
}
}
}
}
/**
* Returns information about the courses a student has access to
*
* Set the $user->teacher course array
* Set the $user->teacheredit course array
* Set the $user->timeaccess course array
*
* @param user referenced object, must contain $user->id already set
*/
function get_teacher_courses(&$user) {
if ($teachers = get_records("user_teachers", "userid", $user->id)) {
$currenttime = time();
foreach ($teachers as $teacher) {
/// Is teacher only teaching this course for a specific time period?
if ( ( $teacher->timestart == 0 or ( $currenttime > $teacher->timestart )) and
( $teacher->timeend == 0 or ( $currenttime < $teacher->timeend )) ) {
$user->teacher[$teacher->course] = true;
if ($teacher->editall) {
$user->teacheredit[$teacher->course] = true;
}
$user->timeaccess[$teacher->course] = $teacher->timeaccess;
}
}
}
}
/**
* Prints the entry form/page for this enrolment
*
* This is only called from course/enrol.php
* Most plugins will probably override this to print payment
* forms etc, or even just a notice to say that manual enrolment
* is disabled
*
* @param course current course object
*/
function print_entry($course) {
global $CFG, $USER, $SESSION, $THEME;
$strloginto = get_string("loginto", "", $course->shortname);
$strcourses = get_string("courses");
/// Automatically enrol into courses without password
if ($course->password == "") { // no password, so enrol
if (isguest()) {
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", "$USER->id");
} else if (empty($_GET['confirm'])) {
print_header($strloginto, $course->fullname, "<a href=\".\">$strcourses</a> -> $strloginto");
echo "<br />";
notice_yesno(get_string("enrolmentconfirmation"), "enrol.php?id=$course->id&confirm=1", $CFG->wwwroot);
print_footer();
exit;
} else {
if ($course->enrolperiod == 0) {
$timestart = 0;
$timeend = 0;
} else {
$timestart = time();
$timeend = time() + $course->enrolperiod;
}
if (! enrol_student($USER->id, $course->id, $timestart, $timeend)) {
error("An error occurred while trying to enrol you.");
}
add_to_log($course->id, "course", "enrol", "view.php?id=$course->id", "$USER->id");
$USER->student[$course->id] = true;
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$course->id";
}
redirect($destination);
}
}
$teacher = get_teacher($course->id);
if (!isset($password)) {
$password = "";
}
print_header($strloginto, $course->fullname, "<A HREF=\".\">$strcourses</A> -> $strloginto", "form.password");
print_course($course);
include("$CFG->dirroot/enrol/internal/enrol.html");
print_footer();
}
/**
* The other half to print_entry, this checks the form data
*
* This function checks that the user has completed the task on the
* enrolment entry page and then enrolls them.
*
* @param form the form data submitted, as an object
* @param course the current course, as an object
*/
function check_entry($form, $course) {
global $CFG, $USER, $SESSION, $THEME;
if ($form->password == $course->password) {
if (isguest()) {
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", $_SERVER['REMOTE_ADDR']);
} else if (!record_exists("user_students", "userid", $USER->id, "course", $course->id)) {
if (! enrol_student($USER->id, $course->id)) {
error("An error occurred while trying to enrol you.");
}
$subject = get_string("welcometocourse", "", $course->fullname);
$a->coursename = $course->fullname;
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id";
$message = get_string("welcometocoursetext", "", $a);
if (! $teacher = get_teacher($course->id)) {
$teacher = get_admin();
}
email_to_user($USER, $teacher, $subject, $message);
add_to_log($course->id, "course", "enrol", "view.php?id=$course->id", "$USER->id");
}
$USER->student[$course->id] = true;
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$course->id";
}
redirect($destination);
} else {
$this->errormsg = get_string("enrolmentkeyhint", "", substr($course->password,0,1));
}
}
/**
* Prints a form for configuring the current enrolment plugin
*
* This function is called from admin/enrol.php, and outputs a
* full page with a form for defining the current enrolment plugin.
*
* @param page an object containing all the data for this page
*/
function config_form($page) {
return "";
}
/**
* Processes and stored configuration data for the enrolment plugin
*
* Processes and stored configuration data for the enrolment plugin
*
* @param config all the configuration data as entered by the admin
*/
function process_config($config) {
return true;
}
/**
* This function is run by admin/cron.php every time
*
* The cron function can perform regular checks for the current
* enrollment plugin. For example it can check a foreign database,
* all look for a file to pull data in from
*
*/
function cron() {
// Delete students from all courses where their enrolment period has expired
$select = "timeend > '0' AND timeend < '" . time() . "'";
if ($students = get_records_select('user_students', $select)) {
foreach ($students as $student) {
unenrol_student($student->userid, $student->course);
}
}
if ($teachers = get_records_select('user_teachers', $select)) {
foreach ($teachers as $teacher) {
remove_teacher($teacher->userid, $teacher->course);
}
}
}
/**
* Returns the relevant icons for a course
*
* Returns the relevant icons for a course
*
* @param course the current course, as an object
*/
function get_access_icons($course) {
global $CFG;
$str = '';
if ($course->guest) {
$strallowguests = get_string("allowguests");
$str .= "<a title=\"$strallowguests\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
$str .= "<img vspace=4 alt=\"$strallowguests\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/guest.gif\"></a>&nbsp;&nbsp;";
}
if ($course->password) {
$strrequireskey = get_string("requireskey");
$str .= "<a title=\"$strrequireskey\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
$str .= "<img vspace=4 alt=\"$strrequireskey\" height=16 width=16 border=0 src=\"$CFG->pixpath/i/key.gif\"></a>";
}
return $str;
}
} /// end of class
?>
-228
View File
@@ -1,228 +0,0 @@
<?php
require_once("$CFG->dirroot/enrol/enrol.class.php");
// The following flags are set in the configuration
// $CFG->enrol_flatfilelocation: where is the file we are looking for?
// $CFG->enrol_flatfilemailusers: send email to users when they are enrolled in a course
// $CFG->enrol_flatfilemailadmin: email the log from the cron job to the admin
// $CFG->enrol_flatfileallowinternal: allow internal enrolment in courses
class enrolment_plugin extends enrolment_base {
var $log;
/// Override the base print_entry() function
function print_entry($course) {
global $CFG;
if (! empty($CFG->enrol_flatfileallowinternal) ) {
parent::print_entry($course);
} else {
print_header();
notice(get_string("enrolmentnointernal"), $CFG->wwwroot);
}
}
/// Override the base check_entry() function
function check_entry($form, $course) {
global $CFG;
if (! empty($CFG->enrol_flatfileallowinternal) ) {
parent::check_entry($form, $course);
}
}
/**
* Override the base cron() function to read in a file
*
* Comma separated file assumed to have four or six fields per line:
* operation, role, idnumber(user), idnumber(course) [, starttime, endtime]
* where:
* operation = add | del
* role = student | teacher | teacheredit
* idnumber(user) = idnumber in the user table NB not id
* idnumber(course) = idnumber in the course table NB not id
* starttime = start time (in seconds since epoch) - optional
* endtime = end time (in seconds since epoch) - optional
*/
function cron() {
global $CFG;
/// call the base class
parent::cron();
if (empty($CFG->enrol_flatfilelocation)) {
$filename = "$CFG->dataroot/1/enrolments.txt"; // Default location
} else {
$filename = $CFG->enrol_flatfilelocation;
}
if ( file_exists($filename) ) {
$this->log = userdate(time()) . "\n";
$this->log .= "Flatfile enrol cron found file: $filename\n\n";
if (($fh = fopen($filename, "r")) != false) {
$line = 0;
while (!feof($fh)) {
$line++;
$fields = explode( ",", str_replace( "\r", "", fgets($fh) ) );
/// If a line is incorrectly formatted ie does not have 4 comma separated fields then ignore it
if (count($fields) != 4 and count($fields) !=6) {
if ( count($fields) > 1 or strlen($fields[0]) > 1) { // no error for blank lines
$this->log .= "$line: Line incorrectly formatted - ignoring\n";
}
continue;
}
$fields[0] = trim(strtolower($fields[0]));
$fields[1] = trim(strtolower($fields[1]));
$fields[2] = trim($fields[2]);
$fields[3] = trim($fields[3]);
$this->log .= "$line: $fields[0] $fields[1] $fields[2] $fields[3] ";
if (!empty($fields[5])) {
$fields[4] = (int)trim($fields[4]);
$fields[5] = (int)trim($fields[5]);
$this->log .= "$fields[4] $fields[5]";
} else {
$fields[4] = 0;
$fields[5] = 0;
}
$this->log .= ":";
/// check correct formatting of operation field
if ($fields[0] != "add" and $fields[0] != "del") {
$this->log .= "Unknown operation in field 1 - ignoring line\n";
continue;
}
/// check correct formatting of role field
if ($fields[1] != "student" and $fields[1] != "teacher" and $fields[1] != "teacheredit") {
$this->log .= "Unknown role in field2 - ignoring line\n";
continue;
}
if (! $user = get_record("user", "idnumber", $fields[2]) ) {
$this->log .= "Unknown user idnumber in field 3 - ignoring line\n";
continue;
}
if (! $course = get_record("course", "idnumber", $fields[3]) ) {
$this->log .= "Unknown course idnumber in field 4 - ignoring line\n";
continue;
}
if ($fields[4] > $fields[5]) {
$this->log .= "Start time was later than end time - ignoring line\n";
continue;
}
unset($elog);
switch ($fields[1]) {
case "student":
if ($fields[0] == "add") {
if (! enrol_student($user->id, $course->id, $fields[4], $fields[5])) {
$elog = "Error enrolling in course\n";
}
} else {
if (! unenrol_student($user->id, $course->id)) {
$elog = "Error unenrolling from course\n";
}
}
break;
case "teacher":
if ($fields[0] == "add") {
if (! add_teacher($user->id, $course->id, 0, '', $fields[4], $fields[5])) {
$elog = "Error adding teacher to course\n";
}
} else {
if (! remove_teacher($user->id, $course->id)) {
$elog = "Error removing teacher from course\n";
}
}
break;
case "teacheredit":
if ($fields[0] == "add") {
if (! add_teacher($user->id, $course->id, 1, '', $fields[4], $fields[5])) {
$elog = "Error adding teacher to course\n";
}
} else {
if (! remove_teacher($user->id, $course->id)) {
$elog = "Error removing teacher from course\n";
}
}
break;
default: // should never get here as checks made above for correct values of $fields[1]
} // end of switch
if ( (! empty($CFG->enrol_flatfilemailusers)) and empty($elog) and ($fields[0] == "add") ) {
$subject = get_string("welcometocourse", "", $course->fullname);
$a->coursename = $course->fullname;
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id";
$message = get_string("welcometocoursetext", "", $a);
if ($fields[1] == "student") {
if (! $teacher = get_teacher($course->id)) {
$teacher = get_admin();
}
} else {
$teacher = get_admin();
}
email_to_user($user, $teacher, $subject, $message);
}
if (empty($elog)) {
$elog = "OK\n";
}
$this->log .= $elog;
} // end of while loop
fclose($fh);
} // end of if(file_open)
if(! @unlink($filename)) {
email_to_user(get_admin(), get_admin(), get_string("filelockedmailsubject", "enrol_flatfile"), get_string("filelockedmail", "enrol_flatfile", $filename));
$this->log .= "Error unlinking file $filename\n";
}
if (! empty($CFG->enrol_flatfilemailadmin)) {
email_to_user(get_admin(), get_admin(), "Flatfile Enrolment Log", $this->log);
}
} // end of if(file_exists)
} // end of function
} // end of class
?>
-6
View File
@@ -1,6 +0,0 @@
add, student, 5, CF101
add, teacher, 6, CF101
add, teacheredit, 7, CF101
del, student, 8, CF101
del, student, 17, CF101
add, student, 21, CF101, 1091115000, 1091215000
-45
View File
@@ -1,45 +0,0 @@
<table cellpadding="20" align="center">
<tr valign="top">
<td>
<p align="center">
<?php
if ($teacher) {
$teachername = "<a href=\"../user/view.php?id=$teacher->id&course=$site->id\">".
"$teacher->firstname $teacher->lastname</a>.";
} else {
$teachername = get_string("yourteacher", "", strtolower($course->teacher));
}
print_string("enrolmentkeyfrom", "", $teachername);
?>
</p>
</td>
</tr>
<tr valign=top>
<td class="generalbox" bgcolor="<?php p($THEME->cellcontent) ?>"><center><?php if (! empty($this->errormsg)) {formerr($this->errormsg);} ?></center>
<form name="form" method="post" action="enrol.php">
<table>
<tr>
<td width="50%" align="right"><p><?php print_string("enrolmentkey") ?>:</p></td>
<td width="50%">
<input type="password" name="password" size="20" value="<?php p($password) ?>" >
<input type="hidden" name="id" value="<?php p($course->id) ?>" >
</td>
<tr>
<td width="50%">&nbsp;</td>
<td width="50%">
<table cellpadding="1" cellspacing="0" align="center">
<tr>
<td><input type="submit" value="<?php print_string("login") ?>">&nbsp;&nbsp;</form></td>
<td><form action="<?php p($CFG->wwwroot)?>/index.php" method=post>
<input type="submit" value="<?php print_string("cancel") ?>"></form></td>
</tr>
</table>
</td>
</table>
</td>
</tr>
</table>
-8
View File
@@ -1,8 +0,0 @@
<?php
require_once("$CFG->dirroot/enrol/enrol.class.php");
class enrolment_plugin extends enrolment_base {
/// nothing to do - it's already perfect!
}
?>
-40
View File
@@ -1,40 +0,0 @@
<div align="center">
<p><?php print_string("paymentrequired") ?></p>
<p><b><?php echo get_string("cost").": $CFG->enrol_paypalcurrency $cost"; ?></b></p>
<p><?php print_string("paymentinstant") ?></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<?php p($CFG->enrol_paypalbusiness)?>">
<input type="hidden" name="item_name" value="<?php p($course->fullname) ?>">
<input type="hidden" name="item_number" value="<?php p($course->shortname) ?>">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="on0" value="<?php print_string("user") ?>">
<input type="hidden" name="os0" value="<?php echo fullname($USER) ?>">
<input type="hidden" name="custom" value="<?php echo "$USER->id-$course->id" ?>">
<input type="hidden" name="currency_code" value="<?php p($CFG->enrol_paypalcurrency) ?>">
<input type="hidden" name="amount" value="<?php p($cost) ?>">
<input type="hidden" name="for_auction" value="false">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="notify_url" value="<?php echo "$CFG->wwwroot/enrol/paypal/ipn.php"?>">
<input type="hidden" name="return" value="<?php echo "$CFG->wwwroot/enrol/paypal/return.php?id=$course->id" ?>">
<input type="hidden" name="cancel_return" value="<?php echo $CFG->wwwroot ?>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="<?php print_string("continuetocourse") ?>">
<input type="hidden" name="first_name" value="<?php p($USER->firstname) ?>">
<input type="hidden" name="last_name" value="<?php p($USER->lastname) ?>">
<input type="hidden" name="address" value="<?php p($USER->address) ?>">
<input type="hidden" name="city" value="<?php p($USER->city) ?>">
<input type="hidden" name="email" value="<?php p($USER->email) ?>">
<input type="hidden" name="country" value="<?php p($USER->country) ?>">
<input type="submit" value="<?php print_string("sendpaymentbutton", "enrol_paypal") ?>">
</form>
</div>
-103
View File
@@ -1,103 +0,0 @@
<?php
require_once("$CFG->dirroot/enrol/enrol.class.php");
class enrolment_plugin extends enrolment_base {
/// Override the base print_entry() function
function print_entry($course) {
global $CFG, $USER;
$strloginto = get_string("loginto", "", $course->shortname);
$strcourses = get_string("courses");
$teacher = get_teacher($course->id);
if ( (float) $course->cost < 0 ) {
$cost = (float) $CFG->enrol_cost;
} else {
$cost = (float) $course->cost;
}
$cost = format_float($cost, 2);
if (abs($cost) < 0.01) { // no cost, default to base class entry to course
parent::print_entry($course);
} else {
print_header($strloginto, $course->fullname,
"<a href=\"$CFG->wwwroot/courses/\">$strcourses</a> -> $strloginto");
print_course($course, "80%");
print_simple_box_start("center");
include("$CFG->dirroot/enrol/paypal/enrol.html");
echo "</div>";
print_simple_box_end();
print_footer();
}
} // end of function print_entry()
/// Override the base check_entry() function
/// This should never be called for this type of enrolment anyway
function check_entry($form, $course) {
}
/// Override the get_access_icons() function
function get_access_icons($course) {
global $CFG;
$str = '';
if ( (float) $course->cost < 0) {
$cost = (float) $CFG->enrol_cost;
} else {
$cost = (float) $course->cost;
}
if (abs($cost) < 0.01) {
$str = parent::get_access_icons($course);
} else {
$strrequirespayment = get_string("requirespayment");
$strcost = get_string("cost");
if (empty($CFG->enrol_paypalcurrency)) {
$CFG->enrol_paypalcurrency = 'USD';
}
switch ($CFG->enrol_paypalcurrency) {
case 'EUR': $currency = '&euro;'; break;
case 'CAD': $currency = '$'; break;
case 'GBP': $currency = '&pound;'; break;
case 'JPY': $currency = '&yen;'; break;
default: $currency = '$'; break;
}
$str .= "<p>$strcost: <a title=\"$strrequirespayment\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
$str .= "$currency".format_float($cost,2).'</a></p>';
}
return $str;
}
} // end of class definition
-199
View File
@@ -1,199 +0,0 @@
<?php // $Id$
/**
* Listens for Instant Payment Notification from Paypal
*
* This script waits for Payment notification from Paypal,
* then double checks that data by sending it back to Paypal.
* If Paypal verifies this then it sets up the enrolment for that
*
* Set the $user->timeaccess course array
*
* @param user referenced object, must contain $user->id already set
*/
require("../../config.php");
require("enrol.php");
/// Keep out casual intruders
if (empty($_POST) or !empty($_GET)) {
error("Sorry, you can not use the script that way.");
}
/// Read all the data from Paypal and get it ready for later
$req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
$data->$key = urldecode($value);
}
$custom = explode('-', $data->custom);
$data->userid = $custom[0];
$data->courseid = $custom[1];
$data->payment_amount = $data->mc_gross;
$data->payment_currency = $data->mc_currency;
/// get the user and course records
if (! $user = get_record("user", "id", $data->userid) ) {
email_paypal_error_to_admin("Not a valid user id", $data);
die;
}
if (! $course = get_record("course", "id", $data->courseid) ) {
email_paypal_error_to_admin("Not a valid course id", $data);
die;
}
/// Open a connection back to PayPal to validate the data
$header = '';
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
if (!$fp) { /// Could not open a socket to Paypal - FAIL
echo "<p>Error: could not access paypal.com</p>";
email_paypal_error_to_admin("Could not access paypal.com to verify payment", $data);
die;
}
/// Connection is OK, so now we post the data to validate it
fputs ($fp, $header.$req);
/// Now read the response and check if everything is OK.
while (!feof($fp)) {
$result = fgets($fp, 1024);
if (strcmp($result, "VERIFIED") == 0) { // VALID PAYMENT!
// check the payment_status and payment_reason
// If status is not completed or pending then unenrol the student if already enrolled
// and notify admin
if ($data->payment_status != "Completed" and $data->payment_status != "Pending") {
unenrol_student($data->userid, $data->courseid);
email_paypal_error_to_admin("Status not completed or pending. User unenrolled from course", $data);
die;
}
// If status is pending and reason is other than echeck then we are on hold until further notice
// Email user to let them know. Email admin.
if ($data->payment_status == "Pending" and $data->pending_reason != "echeck") {
email_to_user($user, getadmin(), "Moodle: Paypal payment", "Your Paypal payment is pending.");
email_paypal_error_to_admin("Payment pending", $data);
die;
}
// If our status is not completed or not pending on an echeck clearance then ignore and die
// This check is redundant at present but may be useful if paypal extend the return codes in the future
if (! ( $data->payment_status == "Completed" or
($data->payment_status == "Pending" and $data->pending_reason == "echeck") ) ) {
die;
}
// At this point we only proceed with a status of completed or pending with a reason of echeck
if ($existing = get_record("enrol_paypal", "txn_id", $data->txn_id)) { // Make sure this transaction doesn't exist already
email_paypal_error_to_admin("Transaction $data->txn_id is being repeated!", $data);
die;
}
if ($data->business != $CFG->enrol_paypalbusiness) { // Check that the email is the one we want it to be
email_paypal_error_to_admin("Business email is $data->business (not $CFG->enrol_paypalbusiness)", $data);
die;
}
if (!$user = get_record('user', 'id', $data->userid)) { // Check that user exists
email_paypal_error_to_admin("User $data->userid doesn't exist", $data);
die;
}
if (!$course = get_record('course', 'id', $data->courseid)) { // Check that course exists
email_paypal_error_to_admin("Course $data->courseid doesn't exist", $data);;
die;
}
// Check that amount paid is the correct amount
if ( (float) $course->cost < 0 ) {
$cost = (float) $CFG->enrol_cost;
} else {
$cost = (float) $course->cost;
}
$cost = format_float($cost, 2);
if ($data->payment_gross < $cost) {
email_paypal_error_to_admin("Amount paid is not enough ($data->payment_gross < $cost))", $data);
die;
}
// ALL CLEAR !
if (!insert_record("enrol_paypal", $data)) { // Insert a transaction record
email_paypal_error_to_admin("Error while trying to insert valid transaction", $data);
}
if (!enrol_student($user->id, $course->id)) { // Enrol the student
email_paypal_error_to_admin("Error while trying to enrol ".fullname($user)." in '$course->fullname'", $data);
die;
} else {
$teacher = get_teacher($course->id);
if (!empty($CFG->enrol_paypalmailstudents)) {
$a->coursename = "$course->fullname";
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id";
email_to_user($user, $teacher, get_string("enrolmentnew", '', $course->shortname), get_string('welcometocoursetext', '', $a));
}
if (!empty($CFG->enrol_paypalmailteachers)) {
email_to_user($teacher, $user, get_string("enrolmentnew", '', $course->shortname), "I have enrolled in your class via Paypal");
}
}
} else if (strcmp ($result, "INVALID") == 0) { // ERROR
insert_record("enrol_paypal", $data);
email_paypal_error_to_admin("Received an invalid payment notification!! (Fake payment?)", $data);
}
}
fclose($fp);
exit;
/// FUNCTIONS //////////////////////////////////////////////////////////////////
function email_paypal_error_to_admin($subject, $data) {
$admin = get_admin();
$site = get_admin();
$message = "$site->fullname: Transaction failed.\n\n$subject\n\n";
foreach ($data as $key => $value) {
$message .= "$key => $value\n";
}
email_to_user($admin, $admin, "PAYPAL ERROR: ".$subject, $message);
}
?>
-34
View File
@@ -1,34 +0,0 @@
<?php // $Id$
require("../../config.php");
require_once("$CFG->dirroot/enrol/$CFG->enrol/enrol.php");
require_variable($id);
if (!$course = get_record("course", "id", $id)) {
redirect($CFG->wwwroot);
}
require_login();
/// Refreshing enrolment data in the USER session
$enrol = new enrolment_plugin();
$enrol->get_student_courses($USER);
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$course->id";
}
if (isstudent($course->id) or isteacher($course->id)) {
redirect($destination, get_string('paymentthanks', '', $course->fullname));
} else { /// Somehow they aren't enrolled yet! :-(
print_header();
notice(get_string('paymentsorry', '', $course), $destination);
}
?>
+2 -3
View File
@@ -18,7 +18,7 @@ function mimeinfo($element, $filename) {
"dv" => array ("type"=>"video/x-dv", "icon"=>"video.gif"),
"doc" => array ("type"=>"application/msword", "icon"=>"word.gif"),
"dif" => array ("type"=>"video/x-dv", "icon"=>"video.gif"),
"eps" => array ("type"=>"application/postscript", "icon"=>"pdf.gif"),
"eps" => array ("type"=>"application/postscript", "icon"=>"image.gif"),
"gif" => array ("type"=>"image/gif", "icon"=>"image.gif"),
"gtar" => array ("type"=>"application/x-gtar", "icon"=>"zip.gif"),
"gz" => array ("type"=>"application/g-zip", "icon"=>"zip.gif"),
@@ -47,9 +47,8 @@ function mimeinfo($element, $filename) {
"pic" => array ("type"=>"image/pict", "icon"=>"image.gif"),
"pict" => array ("type"=>"image/pict", "icon"=>"image.gif"),
"png" => array ("type"=>"image/png", "icon"=>"image.gif"),
"pps" => array ("type"=>"application/vnd.ms-powerpoint", "icon"=>"powerpoint.gif"),
"ppt" => array ("type"=>"application/vnd.ms-powerpoint", "icon"=>"powerpoint.gif"),
"ps" => array ("type"=>"application/postscript", "icon"=>"pdf.gif"),
"ps" => array ("type"=>"application/postscript", "icon"=>"image.gif"),
"qt" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
"ra" => array ("type"=>"audio/x-realaudio", "icon"=>"audio.gif"),
"ram" => array ("type"=>"audio/x-pn-realaudio", "icon"=>"audio.gif"),
+1 -10
View File
@@ -11,10 +11,6 @@
$CFG->texfilterdir = "filter/tex";
$CFG->algebrafilterdir = "filter/algebra";
$CFG->algebraimagedir = "filter/algebra";
if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) {
$CFG->algebrafilterdirwin = "filter\\algebra";
}
$query = urldecode($_SERVER['QUERY_STRING']);
error_reporting(E_ALL);
@@ -90,7 +86,7 @@ function algebra2tex($algebra) {
if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) {
$algebra = "\"". str_replace('"','\"',$algebra) . "\"";
$cmd = "cd $CFG->dirroot\\$CFG->algebrafilterdirwin & algebra2tex.pl $algebra";
$cmd = "cd $CFG->dirroot/$CFG->algebrafilterdir & algebra2tex.pl $algebra";
} else {
$algebra = escapeshellarg($algebra);
$cmd = "cd $CFG->dirroot/$CFG->algebrafilterdir; ./algebra2tex.pl $algebra";
@@ -215,12 +211,7 @@ function tex2image($texexp, $md5) {
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);
}
+1 -6
View File
@@ -42,11 +42,6 @@
// File path to the directory where mathml_filter.php resides
$CFG->algebrafilterdir = "filter/algebra";
$CFG->texfilterdir = "filter/tex";
if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) {
$CFG->algebrafilterdirwin = "filter\\algebra";
}
/// These lines are important - the variable must match the name
/// of the actual function below
@@ -166,7 +161,7 @@ function algebra_filter ($courseid, $text) {
$algebra = preg_replace('!\r\n?!',' ',$algebra);
if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) {
$algebra = "\"". str_replace('"','\"',$algebra) . "\"";
$cmd = "cd $CFG->dirroot\\$CFG->algebrafilterdirwin & algebra2tex.pl $algebra";
$cmd = "cd $CFG->dirroot/$CFG->algebrafilterdir & algebra2tex.pl $algebra";
} else {
$algebra = escapeshellarg($algebra);
$cmd = "cd $CFG->dirroot/$CFG->algebrafilterdir; ./algebra2tex.pl $algebra";
+4 -31
View File
@@ -29,7 +29,7 @@ function mediaplugin_filter($courseid, $text) {
global $CFG;
if (empty($CFG->filter_mediaplugin_ignore_mp3)) {
$search = '/<a(.*?)href=\"([^<]+)\.mp3\"([^>]*)>(.*?)<\/a>/i';
$search = '/<a(.*?)href=\"(.*?)\.mp3\"([^>]*)>(.*?)<\/a>/i';
$replace = '\\0&nbsp;<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
$replace .= ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
@@ -48,7 +48,7 @@ function mediaplugin_filter($courseid, $text) {
}
if (empty($CFG->filter_mediaplugin_ignore_swf)) {
$search = '/<a(.*?)href=\"([^<]+)\.swf\"([^>]*)>(.*?)<\/a>/i';
$search = '/<a(.*?)href=\"(.*?)\.swf\"([^>]*)>(.*?)<\/a>/i';
$replace = '\\0<p class="mediaplugin"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
$replace .= ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
@@ -66,7 +66,7 @@ function mediaplugin_filter($courseid, $text) {
}
if (empty($CFG->filter_mediaplugin_ignore_mov)) {
$search = '/<a(.*?)href=\"([^<]+)\.mov\"([^>]*)>(.*?)<\/a>/i';
$search = '/<a(.*?)href=\"(.*?)\.mov\"([^>]*)>(.*?)<\/a>/i';
$replace = '\\0<p class="mediaplugin"><object classid="CLSID:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
$replace .= ' codebase="http://www.apple.com/qtactivex/qtplugin.cab" ';
@@ -88,7 +88,7 @@ function mediaplugin_filter($courseid, $text) {
}
if (empty($CFG->filter_mediaplugin_ignore_wmv)) {
$search = '/<a(.*?)href=\"([^<]+)\.wmv\"([^>]*)>(.*?)<\/a>/i';
$search = '/<a(.*?)href=\"(.*?)\.wmv\"([^>]*)>(.*?)<\/a>/i';
$replace = '\\0<p class="mediaplugin"><object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"';
$replace .= ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ';
@@ -114,33 +114,6 @@ function mediaplugin_filter($courseid, $text) {
$text = preg_replace($search, $replace, $text);
}
if (empty($CFG->filter_mediaplugin_ignore_mpg)) {
$search = '/<a(.*?)href=\"([^<]+)\.(mpe?g)\"([^>]*)>(.*?)<\/a>/i';
$replace = '\\0<p class="mediaplugin"><object width="240" height="180">';
$replace .= '<param name="src" value="\\2.\\3">';
$replace .= '<param name="controller" value="true">';
$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);
}
if (empty($CFG->filter_mediaplugin_ignore_avi)) {
$search = '/<a(.*?)href=\"([^<]+)\.avi\"([^>]*)>(.*?)<\/a>/i';
$replace = '\\0<p class="mediaplugin"><object width="240" height="180">';
$replace .= '<param name="src" value="\\2.avi">';
$replace .= '<param name="controller" value="true">';
$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);
}
return $text;
}
-5
View File
@@ -119,12 +119,7 @@
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);
}
+1 -23
View File
@@ -36,7 +36,7 @@
$helpfound = true;
include("$filepath"); // The actual helpfile
if ($module == "moodle" and ($file == "index.html" or $file == "mods.html")) {
if ($module == "moodle" && ($file == "index.html" || $file == "mods.html")) {
// include file for each module
if (!$modules = get_records("modules", "visible", 1)) {
@@ -57,27 +57,6 @@
$filepath = "$CFG->dirroot/lang/$lang/help/$mod->name/$file";
if (file_exists("$filepath")) {
echo '<hr size="1" />';
include("$filepath"); // The actual helpfile
break;
}
}
}
}
if ($module == "moodle" and ($file == "resource/types.html")) { // RESOURCES
require_once("$CFG->dirroot/mod/resource/lib.php");
$typelist = resource_get_resource_types();
$typelist['label'] = get_string('resourcetypelabel', 'resource');
foreach ($typelist as $type => $name) {
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}
$filepath = "$CFG->dirroot/lang/$lang/help/resource/type/$type.html";
if (file_exists("$filepath")) {
echo '<hr size="1" />';
include("$filepath"); // The actual helpfile
break;
}
@@ -97,7 +76,6 @@
print_simple_box_end();
if (!$helpfound) {
$file = clean_text($file); // Keep it clean!
notify("Help file '$file' could not be found!");
}
+125 -213
View File
@@ -1,16 +1,9 @@
<?PHP // $Id$
// index.php - the front page.
// Bounds for block widths
define('BLOCK_L_MIN_WIDTH', 160);
define('BLOCK_L_MAX_WIDTH', 210);
define('BLOCK_R_MIN_WIDTH', 160);
define('BLOCK_R_MAX_WIDTH', 210);
require_once("config.php");
require_once("course/lib.php");
require_once('lib/blocklib.php');
require_once("mod/resource/lib.php");
require_once("mod/resource/lib.php");
require_once("mod/forum/lib.php");
if (! $site = get_site()) {
@@ -28,12 +21,7 @@
}
if (empty($USER->id)) {
if (empty($CFG->loginhttps)) {
$wwwroot = $CFG->wwwroot;
} else {
$wwwroot = str_replace('http','https',$CFG->wwwroot);
}
$loginstring = "<font size=2><a href=\"$wwwroot/login/index.php\">".get_string("login")."</a></font>";
$loginstring = "<font size=2><a href=\"$CFG->wwwroot/login/index.php\">".get_string("login")."</a></font>";
} else {
$loginstring = "<font size=1>".user_login_string($site)."</font>";
}
@@ -50,225 +38,149 @@
"<meta name=\"description\" content=\"".s(strip_tags($site->summary))."\">",
true, "", "$loginstring$langmenu");
$editing = isediting($site->id);
$firstcolumn = false; // for now
$lastcolumn = false; // for now
$side = 175;
$courseformat = COURSE_FORMAT_SITE;
// Doing this now so we can pass the results to block_action()
// and dodge the overhead of doing the same work twice.
$blocks = $site->blockinfo;
$delimpos = strpos($blocks, ':');
if($delimpos === false) {
// No ':' found, we have all left blocks
$leftblocks = explode(',', $blocks);
$rightblocks = array();
}
else if($delimpos === 0) {
// ':' at start of string, we have all right blocks
$blocks = substr($blocks, 1);
$leftblocks = array();
$rightblocks = explode(',', $blocks);
}
else {
// Both left and right blocks
$leftpart = substr($blocks, 0, $delimpos);
$rightpart = substr($blocks, $delimpos + 1);
$leftblocks = explode(',', $leftpart);
$rightblocks = explode(',', $rightpart);
$site_summary_editbuttons = '';
if (isediting($site->id)) {
$site_summary_editbuttons = "<br><center><a href=\"$CFG->admin/site.php\"><img src=\"pix/i/edit.gif\" border=0></a>";
}
if($editing) {
if (isset($_GET['blockaction'])) {
if (isset($_GET['blockid'])) {
block_action($site, $leftblocks, $rightblocks, strtolower($_GET['blockaction']), intval($_GET['blockid']));
}
}
// This has to happen after block_action() has possibly updated the two arrays
$allblocks = array_merge($leftblocks, $rightblocks);
$missingblocks = array();
$recblocks = get_records('blocks','visible','1');
// Note down which blocks are going to get displayed
blocks_used($allblocks, $recblocks);
if($editing && $recblocks) {
foreach($recblocks as $recblock) {
// If it's not hidden or displayed right now...
if(!in_array($recblock->id, $allblocks) && !in_array(-($recblock->id), $allblocks)) {
// And if it's applicable for display in this format...
if(block_method_result($recblock->name, 'applicable_formats') & $courseformat) {
// Add it to the missing blocks
$missingblocks[] = $recblock->id;
}
}
}
}
}
else {
// Note down which blocks are going to get displayed
$allblocks = array_merge($leftblocks, $rightblocks);
$recblocks = get_records('blocks','visible','1');
blocks_used($allblocks, $recblocks);
if ($site->summary) {
$lastcolumn = true;
}
// If the block width cache is not set, set it
if(!isset($SESSION->blockcache->width->{$site->id}) || $editing) {
// This query might be optimized away if we 're in editing mode
if(!isset($recblocks)) {
$recblocks = get_records('blocks','visible','1');
}
$preferred_width_left = blocks_preferred_width($leftblocks, $recblocks);
$preferred_width_right = blocks_preferred_width($rightblocks, $recblocks);
// This may be kind of organizational overkill, granted...
// But is there any real need to simplify the structure?
$SESSION->blockcache->width->{$site->id}->left = $preferred_width_left;
$SESSION->blockcache->width->{$site->id}->right = $preferred_width_right;
}
else {
$preferred_width_left = $SESSION->blockcache->width->{$site->id}->left;
$preferred_width_right = $SESSION->blockcache->width->{$site->id}->right;
}
$preferred_width_left = min($preferred_width_left, BLOCK_L_MAX_WIDTH);
$preferred_width_left = max($preferred_width_left, BLOCK_L_MIN_WIDTH);
$preferred_width_right = min($preferred_width_right, BLOCK_R_MAX_WIDTH);
$preferred_width_right = max($preferred_width_right, BLOCK_R_MIN_WIDTH);
?>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<?PHP
<?PHP
$sections = get_all_sections($site->id);
if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id) or isadmin()) {
if(block_have_active($leftblocks) || $editing) {
echo '<td style="vertical-align: top; width: '.$preferred_width_left.'px;">';
print_course_blocks($site, $leftblocks, BLOCK_LEFT);
echo '</td>';
}
echo "<td width=\"$side\" valign=top nowrap>";
$firstcolumn=true;
if ($sections[0]->sequence or isediting($site->id)) {
get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused);
print_section_block(get_string("mainmenu"), $site, $sections[0],
$mods, $modnames, $modnamesused, true, $side);
}
echo '<td style="vertical-align: top;">';
if (isadmin()) {
echo "<div align=\"center\">".update_course_icon($site->id)."</div>";
echo "<br />";
}
switch ($CFG->frontpage) {
case FRONTPAGENEWS: // print news links on the side
print_courses_sideblock(0, "$side");
break;
case FRONTPAGECOURSELIST:
case FRONTPAGECATEGORYNAMES:
if ($site->newsitems) {
if ($news = forum_get_course_forum($site->id, "news")) {
print_side_block_start(get_string("latestnews"), $side, "sideblocklatestnews");
echo "<font size=\"-2\">";
forum_print_latest_discussions($news->id, $site->newsitems, "minimal", "", false);
echo "</font>";
print_side_block_end();
}
}
break;
}
print_spacer(1,$side);
}
if (iscreator()) {
if (!$firstcolumn) {
echo "<td width=\"$side\" valign=top nowrap>";
$firstcolumn=true;
}
print_admin_links($site->id, $side);
}
if ($firstcolumn) {
echo "</td>";
}
if ($lastcolumn) {
echo "<td width=\"70%\" valign=\"top\">";
} else {
echo "<td width=\"100%\" valign=\"top\">";
}
switch ($CFG->frontpage) { /// Display the main part of the front page.
case FRONTPAGENEWS:
if (! $newsforum = forum_get_course_forum($site->id, "news")) {
error("Could not find or create a main news forum for the site");
}
/// Print Section
if ($site->numsections > 0) {
print_simple_box_start('center', '100%', $THEME->cellcontent, 5, 'sitetopic');
if (isset($USER->id)) {
$SESSION->fromdiscussion = "$CFG->wwwroot";
if (forum_is_subscribed($USER->id, $newsforum->id)) {
$subtext = get_string("unsubscribe", "forum");
} else {
$subtext = get_string("subscribe", "forum");
}
$headertext = "<table border=0 width=100% cellpadding=0 cellspacing=0 class=headingblockcontent><tr>
<td>$newsforum->name</td>
<td align=right><font size=1>
<a href=\"mod/forum/subscribe.php?id=$newsforum->id\">$subtext</a>
</td></tr></table>";
} else {
$headertext = $newsforum->name;
}
print_heading_block($headertext);
print_spacer(8,1);
forum_print_latest_discussions($newsforum->id, $site->newsitems);
break;
/// If currently moving a file then show the current clipboard
if (ismoving($site->id)) {
$stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname)));
echo "<p><font size=2>";
echo "$stractivityclipboard&nbsp;&nbsp;(<a href=\"course/mod.php?cancelcopy=true\">".get_string("cancel")."</a>)";
echo "</font></p>";
}
case FRONTPAGECOURSELIST:
case FRONTPAGECATEGORYNAMES:
if (isset($USER->id) and !isset($USER->admin)) {
print_heading_block(get_string("mycourses"));
print_spacer(8,1);
print_my_moodle();
} else {
if (count_records("course_categories") > 1) {
if ($CFG->frontpage == FRONTPAGECOURSELIST) {
print_heading_block(get_string("availablecourses"));
} else {
print_heading_block(get_string("categories"));
}
print_spacer(8,1);
print_simple_box_start("center", "100%");
print_whole_category_list();
print_simple_box_end();
print_course_search("", false, "short");
} else {
print_heading_block(get_string("availablecourses"));
print_spacer(8,1);
print_courses(0, "100%");
}
}
break;
}
if (!$section = get_record('course_sections', 'course', $site->id, 'section', 1)) {
delete_records('course_sections', 'course', $site->id, 'section', 1); // Just in case
$section->course = $site->id;
$section->section = 1;
$section->summary = '';
$section->visible = 1;
$section->id = insert_record('course_sections', $section);
}
echo "</td>";
echo format_text($section->summary, FORMAT_HTML);
if ($editing) {
$streditsummary = get_string('editsummary');
echo "<a title=\"$streditsummary\" ".
" href=\"course/editsection.php?id=$section->id\"><img src=\"$CFG->pixpath/t/edit.gif\" ".
" height=11 width=11 border=0 alt=\"$streditsummary\"></a><br />";
}
echo '<br clear="all">';
get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused);
print_section($site, $section, $mods, $modnamesused, true);
if ($editing) {
print_section_add_menus($site, $section->section, $modnames);
}
print_simple_box_end();
print_spacer(10);
}
switch ($CFG->frontpage) { /// Display the main part of the front page.
case FRONTPAGENEWS:
if (! $newsforum = forum_get_course_forum($site->id, "news")) {
error("Could not find or create a main news forum for the site");
}
if (isset($USER->id)) {
$SESSION->fromdiscussion = "$CFG->wwwroot";
if (forum_is_subscribed($USER->id, $newsforum->id)) {
$subtext = get_string("unsubscribe", "forum");
} else {
$subtext = get_string("subscribe", "forum");
}
$headertext = "<table border=0 width=100% cellpadding=0 cellspacing=0 class=headingblockcontent><tr>
<td>$newsforum->name</td>
<td align=right><font size=1>
<a href=\"mod/forum/subscribe.php?id=$newsforum->id\">$subtext</a>
</td></tr></table>";
} else {
$headertext = $newsforum->name;
}
print_heading_block($headertext);
print_spacer(8,1);
forum_print_latest_discussions($newsforum->id, $site->newsitems);
break;
case FRONTPAGECOURSELIST:
case FRONTPAGECATEGORYNAMES:
if (isset($USER->id) and !isset($USER->admin)) {
print_heading_block(get_string("mycourses"));
print_spacer(8,1);
print_my_moodle();
} else {
if (count_records("course_categories") > 1) {
if ($CFG->frontpage == FRONTPAGECOURSELIST) {
print_heading_block(get_string("availablecourses"));
} else {
print_heading_block(get_string("categories"));
}
print_spacer(8,1);
print_simple_box_start("center", "100%");
print_whole_category_list();
print_simple_box_end();
print_course_search("", false, "short");
} else {
print_heading_block(get_string("availablecourses"));
print_spacer(8,1);
print_courses(0, "100%");
}
}
break;
}
echo '</td>';
if(block_have_active($rightblocks) || $editing || isadmin()) {
echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
if (isadmin()) {
echo '<div align="center">'.update_course_icon($site->id).'</div>';
echo '<br />';
}
print_course_blocks($site, $rightblocks, BLOCK_RIGHT);
if ($editing && !empty($missingblocks)) {
block_print_blocks_admin($site, $missingblocks);
}
echo '</td>';
}
?>
if ($lastcolumn) {
echo "<td width=\"30%\" valign=\"top\">";
print_simple_box(format_text($site->summary, FORMAT_HTML).$site_summary_editbuttons,
"", "100%", $THEME->cellcontent2, 5, "siteinfo");
print_spacer(1,$side);
echo "</td>";
}
?>
</tr>
</table>
<?PHP print_footer('home'); // Please do not modify this line ?>
<?PHP print_footer("home"); // Please do not modify this line ?>
-10
View File
@@ -1,10 +0,0 @@
<?PHP // $Id$
// admin.php - created with Moodle 1.3 development (2004042600)
$string['cachetext'] = 'ÚãÑ ÇáäÕ ÇáãÎÈÇÁ';
$string['filteruploadedfiles'] = 'ÊäÞíÍ ÇáãáÝÇÊ ÇáãÍãáå';
$string['upgradelogs'] = 'áÅÏÇÁ æÙíÝí ßÇãá¡ ÓÌáÇÊß ÇáÞÏíãÉ ÊÍÊÇÌ áÊÑÞíÉ <a href=\"$a\">ãÚáæãÇÊ ÅÖÇÝíÉ</a>';
$string['upgradinglogs'] = 'ÊÑÞíÉ ÇáÓÌáÇÊ';
?>
-7
View File
@@ -1,7 +0,0 @@
<?PHP // $Id$
// algebra.php - created with Moodle 1.3 development (2004042600)
$string['filtername'] = 'ÇáÊÑÞíã ÇáÌÈÑí';
?>
+71 -72
View File
@@ -1,72 +1,71 @@
<?PHP // $Id$
// attendance.php - created with Moodle 1.4 development (2004062401)
$string['absentlong'] = 'غائب';
$string['absentshort'] = 'غ';
$string['addingmultiple'] = 'إضافة قوائم حضور متعددة';
$string['addmultiple'] = 'أضف قوائم حضور متعددة';
$string['allmodulename'] = 'كل قوائم الحضور';
$string['auto'] = 'آلي';
$string['autoattend'] = 'تدوين الحضور آليا بناء على سجلات نشاط المستخدم';
$string['autoattendmulti'] = 'تدوين جميع قوائم الحضور آليا بناء على سجلات نشاط المستخدم';
$string['autoattendshort'] = 'آلياً من سجلات الأداء';
$string['choosedays'] = 'أيام كل أسبوع لتسجيل الحضور';
$string['dayofroll'] = 'تاريخ لتسجل حضور لـ';
$string['defaultautoattend'] = 'هل يكون تدون الحضور على أساس سجلات نشاط المستخدم افتراضيا';
$string['defaultdynamicsection'] = 'هل توضع قوائم الحضور في الاسبوع الصحيح افتراضيا';
$string['defaultgrade'] = 'هل تجعل قوائم الحضور بدراجات افتراضيا';
$string['defaulthoursinclass'] = 'كم عدد الساعات التى يجب ان تكون لكل قائمة حضور افتراضيه';
$string['defaultmaxgrade'] = 'ماهي قيمة الدرجة القصوى الافتراضيهالتى يجب ان ترصد للحضور الكامل';
$string['defaultstudentstatus'] = 'الحالة الافتراضيه لحضور الطالب في قوائم الحضور الجديدة';
$string['downloadexcelfull'] = 'تنزيل جدول اكسل كامل';
$string['downloadexceltotals'] = 'تنزيل جدول اكسل ملخص';
$string['downloadtextfull'] = 'تنزيل تقرير كامل بصيغة نصيه';
$string['downloadtexttotals'] = 'تنزيل تقرير ملخص بصيغة نصيه';
$string['dynamicsection'] = 'بناءً على هذا التاريخ حدد اسبوع الحضور';
$string['dynamicsectionmulti'] = 'ضع قوائم الحضور في اقسامها الاسبوعية آلياً';
$string['dynsectionshort'] = 'حرك هذا القسم دينمكياً';
$string['endbeforestart'] = 'تاريخ الانتهاء قبل تاريخ البدء';
$string['endmulti'] = 'تاريخ آخر قائمة حضور';
$string['for'] = 'لـ';
$string['friday'] = 'الجمعة';
$string['gradeshort'] = 'بدرجة';
$string['gradevalue'] = 'اجعل قائمة الحضور هذه بدرجات';
$string['gradevaluemulti'] = 'اجعل قوائم الحضور هذه بدرجات';
$string['hoursinclass'] = 'عدد الساعات للفترة دراسية';
$string['hoursineachclass'] = 'عدد الساعات لكل فترة دراسية';
$string['hoursinfullreport'] = 'الحد الاقصى لعدد ساعات الحضور التي يجب عرضها في صفحة واحد أو تقرير';
$string['maxgradeshort'] = 'الدرجة القصوى';
$string['maxgradevalue'] = 'قيمة الدرجة القصوى للحضور الكامل';
$string['modulename'] = 'حضور';
$string['modulenameplural'] = 'قوائم حضور';
$string['monday'] = 'الاثنين';
$string['norolls'] = 'لا توجد قوائم حضور لهذه المنهج الدراسي';
$string['notes'] = 'معلومات استثنائيه';
$string['notesfor'] = 'معلومات استثنائيه لـ';
$string['noviews'] = 'عذراً، لا توجد معلومات عن حسابك هناء';
$string['of'] = 'من';
$string['pages'] = 'صفحات';
$string['presentlong'] = 'حاضر';
$string['presentshort'] = 'ح';
$string['saturday'] = 'السبت';
$string['startafterend'] = 'تأريخ البداء هو بعد إنتهاء المنهج الدراسي';
$string['startmulti'] = 'تاريخ لأول قائمة حضور';
$string['sunday'] = 'الأحد';
$string['takeroll'] = 'سجل الحضور في هذا اليوم?';
$string['tardiesperabsence'] = 'كم تأخير يمكن حسابه كغياب واحد';
$string['tardylong'] = 'متأخر';
$string['tardyshort'] = 'م';
$string['teacheredit'] = 'تم تسجيل الحضور';
$string['thursday'] = 'الخميس';
$string['tuesday'] = 'الثلاثاء';
$string['viewall'] = 'معاينة جميع قوائم الحضور';
$string['viewmulti'] = 'معاينة التقرير في عدة صفحات';
$string['viewone'] = 'معاينة جميع صفحات التقرير';
$string['viewsection'] = 'معاينة جميع قوائم حضور هذا الجزء';
$string['viewtable'] = 'معاينة التقارير في جدول واحد';
$string['viewweek'] = 'معاينة جميع قوائم الحضور من تقوسم الاسبوع';
$string['wednesday'] = 'الأربعاء';
$string['weekmodulename'] = 'جميع قوائم حضور الاسبوع الماضي';
?>
<?PHP // $Id$
// attendance.php - created with Moodle 1.2 development (2004012800)
$string['absentlong'] = 'غائب';
$string['absentshort'] = 'غ';
$string['addingmultiple'] = 'إضافة قوائم حضور متعددة';
$string['addmultiple'] = 'أضف قوائم حضور متعددة';
$string['allmodulename'] = 'كل قوائم الحضور';
$string['auto'] = 'آلي';
$string['autoattend'] = 'تدوين الحضور آليا بناء على سجلات نشاط المستخدم';
$string['autoattendmulti'] = 'تدوين جميع قوائم الحضور آليا بناء على سجلات نشاط المستخدم';
$string['autoattendshort'] = 'آلياً من سجلات الأداء';
$string['choosedays'] = 'أيام كل أسبوع لتسجيل الحضور';
$string['dayofroll'] = 'تاريخ لتسجل حضور لـ';
$string['defaultautoattend'] = 'هل يكون تدون الحضور على أساس سجلات نشاط المستخدم افتراضيا';
$string['defaultdynamicsection'] = 'هل توضع قوائم الحضور في الاسبوع الصحيح افتراضيا';
$string['defaultgrade'] = 'هل تجعل قوائم الحضور بدراجات افتراضيا';
$string['defaulthoursinclass'] = 'كم عدد الساعات التى يجب ان تكون لكل قائمة حضور افتراضيه';
$string['defaultmaxgrade'] = 'ماهي قيمة الدرجة القصوى الافتراضيهالتى يجب ان ترصد للحضور الكامل';
$string['defaultstudentstatus'] = 'الحالة الافتراضيه لحضور الطالب في قوائم الحضور الجديدة';
$string['downloadexcelfull'] = 'تنزيل جدول اكسل كامل';
$string['downloadexceltotals'] = 'تنزيل جدول اكسل ملخص';
$string['downloadtextfull'] = 'تنزيل تقرير كامل بصيغة نصيه';
$string['downloadtexttotals'] = 'تنزيل تقرير ملخص بصيغة نصيه';
$string['dynamicsection'] = 'بناءً على هذا التاريخ حدد اسبوع الحضور';
$string['dynamicsectionmulti'] = 'ضع قوائم الحضور في اقسامها الاسبوعية آلياً';
$string['dynsectionshort'] = 'حرك هذا القسم دينمكياً';
$string['endbeforestart'] = 'تاريخ الانتهاء قبل تاريخ البدء';
$string['endmulti'] = 'تاريخ آخر قائمة حضور';
$string['for'] = 'لـ';
$string['friday'] = 'الجمعة';
$string['gradeshort'] = 'بدرجة';
$string['gradevalue'] = 'اجعل قائمة الحضور هذه بدرجات';
$string['gradevaluemulti'] = 'اجعل قوائم الحضور هذه بدرجات';
$string['hoursinclass'] = 'عدد الساعات للفترة دراسية';
$string['hoursineachclass'] = 'عدد الساعات لكل فترة دراسية';
$string['hoursinfullreport'] = 'الحد الاقصى لعدد ساعات الحضور التي يجب عرضها في صفحة واحد أو تقرير';
$string['maxgradeshort'] = 'الدرجة القصوى';
$string['maxgradevalue'] = 'قيمة الدرجة القصوى للحضور الكامل';
$string['modulename'] = 'حضور';
$string['modulenameplural'] = 'قوائم حضور';
$string['monday'] = 'الاثنين';
$string['norolls'] = 'لا توجد قوائم حضور لهذه المنهج الدراسي';
$string['notes'] = 'معلومات استثنائيه';
$string['notesfor'] = 'معلومات استثنائيه لـ';
$string['noviews'] = 'عذراً، لا توجد معلومات عن حسابك هناء';
$string['of'] = 'من';
$string['pages'] = 'صفحات';
$string['presentlong'] = 'حاضر';
$string['presentshort'] = 'ح';
$string['saturday'] = 'السبت';
$string['startafterend'] = 'تأريخ البداء هو بعد إنتهاء المنهج الدراسي';
$string['startmulti'] = 'تاريخ لأول قائمة حضور';
$string['sunday'] = 'الأحد';
$string['takeroll'] = 'سجل الحضور في هذا اليوم?';
$string['tardiesperabsence'] = 'كم تأخير يمكن حسابه كغياب واحد';
$string['tardylong'] = 'متأخر';
$string['tardyshort'] = 'م';
$string['thursday'] = 'الخميس';
$string['tuesday'] = 'الثلاثاء';
$string['viewall'] = 'معاينة جميع قوائم الحضور';
$string['viewmulti'] = 'معاينة التقرير في عدة صفحات';
$string['viewone'] = 'معاينة جميع صفحات التقرير';
$string['viewsection'] = 'معاينة جميع قوائم حضور هذا الجزء';
$string['viewtable'] = 'معاينة التقارير في جدول واحد';
$string['viewweek'] = 'معاينة جميع قوائم الحضور من تقوسم الاسبوع';
$string['wednesday'] = 'الأربعاء';
$string['weekmodulename'] = 'جميع قوائم حضور الاسبوع الماضي';
?>
+66 -67
View File
@@ -1,67 +1,66 @@
<?PHP // $Id$
// auth.php - created with Moodle 1.3 development (2004042600)
$string['auth_dbdescription'] = 'يستخدم هذا الأسلوب جدول بيانات خارجي للتحقق من صحة اسم المستخدم وكلمة المرور. وفي حالة الحسابات الجديدة فقد يتم نسخ المعلومات من الحقول الأخرى أيضا ونقلها إلى نظام Moodle.';
$string['auth_dbextrafields'] = 'هذه الحقول اختيارية، ويمكنك ملء بعض حقول المستخدم في نظام Moodle مسبقا بالمعلومات من <B>حقول البيانات الخارجية</B> التي تقوم بتحديدها هنا. <P>إذا تركت هذه الأماكن فارغة فسوف يتم اختيار الأوضاع الافتراضية.<P>وفي كل الأحوال، فسوف يتمكن المستخدم من تعديل كل تلك الحقول بعد الدخول.';
$string['auth_dbfieldpass'] = 'اسم الحقل المشتمل على كلمات المرور';
$string['auth_dbfielduser'] = 'اسم الحقل المشتمل على أسماء المستخدمين';
$string['auth_dbhost'] = 'هذا الحاسب يستضيف مزود قاعدة البيانات.';
$string['auth_dbname'] = 'اسم قاعدة البيانات ذاتها';
$string['auth_dbpass'] = 'كلمة المرور المطابقة لاسم المستخدم المذكور';
$string['auth_dbpasstype'] = 'حدّد الشّكل الذي يستخدمه حقل كلمة السّر. تشفير MD5 مفيد للتّوصيل تطبيقات الويب الشّائعة الأخرى مثل PostNuke';
$string['auth_dbtable'] = 'اسم الجدول في قاعدة البيانات';
$string['auth_dbtitle'] = 'استخدم قاعدة بيانات خارجية';
$string['auth_dbtype'] = 'نوع قاعدة البيانات (أنظر <A HREF=../lib/adodb/readme.htm#drivers>ADOdb documentation</A> للمزيد من التفاصيل';
$string['auth_dbuser'] = 'اسم المستخدم مع حق الدخول على قاعدة البيانات للقراءة فقط';
$string['auth_emaildescription'] = 'يتم التوثيق عادة عبر البريد الإلكتروني، وهو الوضع الافتراضي لأسلوب التوثيق. فعندما يقوم المستخدم بالتوقيع وباختيار اسم المستخدم وكلمة المرور الخاصة به يتم إرسال رسالة توكيدية إلى عنوانه البريدي. ويحتوي البريد الإلكتروني على رابطة آمنة تؤدي إلى صفحة يستطيع المستخدم من خلالها توكيد اشتراكه. وفي حالة الدخول فيما بعد يتم التحقق من اسم المستخدم وكلمة المرور بمقابلتها بالمخزنة في قاعدة بيانات نظام Moodle..';
$string['auth_emailtitle'] = 'توثيق يتم عن طريق البريد الإلكتروني';
$string['auth_imapdescription'] = 'يستخدم هذا الأسلوب مزود IMAP للتحقق من صحة اسم المستخدم وكلمة المرور.';
$string['auth_imaphost'] = 'عنوان مزود IMAP. استخدم رقم البروتوكول لا اسم النطاق.';
$string['auth_imapport'] = 'رقم منفذ مزود IMAP . يكون في الغالب 143 أو 993.';
$string['auth_imaptitle'] = 'استخدم مزود IMAP';
$string['auth_imaptype'] = 'نوع مزود IMAP . من الممكن لمزودات IMAP أن تكون لديها أنواع مختلفة من التوثيق والتفاوض.';
$string['auth_ldap_bind_dn'] = 'إذا أردت استخدام وظيفة bind-user للبحث عن مستخدمين فيمكنك تعيين ذلك هنا، كأن تحدد مثلا: \'cn=ldapuser,ou=public,o=org\'';
$string['auth_ldap_bind_pw'] = 'كلمة مرور bind-user';
$string['auth_ldap_contexts'] = 'قائمة السياقات الموجود بها المستخدمين، حيث يفصل بين كل سياق وآخر بفاصلة هكذا: \'ou=users,o=org; ou=others,o=org\'';
$string['auth_ldap_create_context'] = 'لو مكّنت إنشاء المستخدم بتأكيد البريد الإلكترونيّ, حدّد السّياق إنشاء مستخدمون . يجب أن يكون هذا السّياق مختلف عن المستخدمين الآخرين لمنع القضايا الأمنيّة . لا تحتاج لإضافة هذا السّياق سياق الـمتغير(ldap_context-variable) مودل سيبحث عن المستخدمين من هذا السّياق تلقائيًّا ';
$string['auth_ldap_creators'] = 'قائمة الجماعات التى يُسْمَح لأعضائها القيام بانشاء مناهج دراسية جديدة. أفصل بين الجماعات المتعدّدة بـ \";\" عادة على الشكل التالي (cn=teachers,ou=staff,o=myorg)';
$string['auth_ldap_host_url'] = 'حدد مضيف برتوكول الدخول على الدليل الخفيف LDAPفي شكل عنوان إنترنت مثل \'ldap://ldap.myorg.com/\' أو \'ldaps://ldap.myorg.com/\' ';
$string['auth_ldap_memberattribute'] = 'حدد صفة العضو المستخدم، عندما ينتمي المستخدمون لمجموعة. عادة \"عضو\"';
$string['auth_ldap_search_sub'] = 'ضع قيمة &lt;&gt; 0 إذا أردت أن تبحث عن مستخدمين من سياقات فرعية.';
$string['auth_ldap_update_userinfo'] = 'تحديث معلومات المستخدم (الاسم الأول، الاسم الأخير، العنوان، …) من برتوكول الدخول على الدليل الخفيف LDAPإلى نظام Moodle . أنظر /auth/ldap/attr_mappings.php للحصول على معلومات عن التخطيط';
$string['auth_ldap_user_attribute'] = 'الوصف المستخدم لتسمية/البحث عن المستخدمين، وغالبا ما يكون \'cn\'.';
$string['auth_ldap_version'] = 'أصدار نظام الـ LDAP المستخدم في خادمك';
$string['auth_ldapdescription'] = 'هذا الأسلوب يقدم التوثيق في مقابل مزود خارجي لبروتوكول الدخول على الدليل الخفيف LDAP.
إذا كان كل من اسم المستخدم وكلمة المرور صحيحا فإن نظام Moodle يقوم بإنشاء إدخال مستخدم جديد في قاعدة بياناته. ويمكن لهذه الوحدة النمطية قراءة سمات المستخدم من بروتوكول الدخول على الدليل الخفيف LDAP وملء الحقول المطلوبة في نظام Moodle . ولا يحتاج عند الدخول لاحقا سوى إلى التحقق من اسم المستخدم وكلمة المرور.';
$string['auth_ldapextrafields'] = 'هذه الحقول اختيارية، ويمكنك ملء بعض حقول المستخدم في نظام Moodle مسبقا بالمعلومات من <B>حقول LDAP </B> التي تقوم بتحديدها هنا. <P>إذا تركت هذه الحقول فارغة فلن يتم نقل أي شيء من بروتوكول الدخول على الدليل الخفيف LDAP ، بل يتم استخدام الأوضاع الافتراضية الموجودة بنظام Moodle.<P>وفي كل الأحوال، فسوف يتمكن المستخدم من تعديل كل تلك الحقول بعد الدخول.';
$string['auth_ldaptitle'] = 'استخدم مزود LDAP';
$string['auth_manualdescription'] = 'يعطل هذا الاسلوب جميع الطرق التي تمكن المستخدمين من انشاء حساباتهم. جميع الحسابات لا بد ان تنشاء يدوياً من قبل المدير';
$string['auth_manualtitle'] = 'الحسابات اليدوية فقط';
$string['auth_multiplehosts'] = 'يمكن تحديد اكثر من مستضيف مواقع (host1.com, host2.net, host3.org)';
$string['auth_nntpdescription'] = 'هذا الأسلوب يستخدم مزود بروتوكول الشبكة لنقل الأخبار NNTP للتأكد من صحة اسم المستخدم وكلمة المرور.';
$string['auth_nntphost'] = 'عنوان مزود بروتوكول الشبكة لنقل الأخبار NNTP. استخدم رقم البروتوكول لا اسم النطاق.';
$string['auth_nntpport'] = 'منفذ المزود (119 هو الأكثر شيوعا)';
$string['auth_nntptitle'] = 'استخدم مزود NNTP';
$string['auth_nonedescription'] = 'يمكن للمستخدمين التوقيع ثم إنشاء حسابات صحيحة على الفور، دون حاجة للتوثيق في مقابل مزود خارجي أو إلى التوكيد من خلال البريد الإلكتروني. ينصح بالحرص عن استخدام هذا الخيار - وتدير عواقب مشاكل الحماية والإدارة التي قد تنتج عنه.';
$string['auth_nonetitle'] = 'لا يوجد توثيق';
$string['auth_pop3description'] = 'يستخدم هذا الأسلوب مزود برتوكول مكتب البريد3 POP3 للتأكد من صحة اسم المستخدم وكلمة المرور.';
$string['auth_pop3host'] = 'عنوان مزود برتوكول مكتب البريد3 POP3. استخدم رقم البروتوكول لا اسم النطاق.';
$string['auth_pop3port'] = 'منفذ المزود (110 هي الأكثر شيوعا)';
$string['auth_pop3title'] = 'استخدم مزود POP3';
$string['auth_pop3type'] = 'نوع المزود. إذا كان مزودك يستخدم حماية الشهادة، قم باختيار pop3cert.';
$string['auth_user_create'] = 'تمكين إنشاء مستخدم';
$string['auth_user_creation'] = 'يستطيع المستخدمون الجدد أو (المجهولون) انشاء حسابات على مصدر التوثيق الخارجيّ و تأكيّد التسجيل عبر بريد إلكترونيّ . إذا أنت مكنت هذه الخاصيه, أذن تذكّر أن توفّق بين الخيارات ذات المركبة المحدّدة لإنشاء المستخدم أيضًا';
$string['auth_usernameexists'] = 'الاسم المختار موجود، الرجاء اختيار اسم اخر';
$string['authenticationoptions'] = 'خيارات التوثيق';
$string['authinstructions'] = 'هنا يمكنك إعطاء تعليمات للمستخدمين لديك حتى يعرفوا أسماء المستخدمين وكلمات المرور التي يتعين عليهم استخدامها. سيظهر النص الذي تقوم بإدخاله هنا على صفحة الدخول. إذا تركت هذا المكان فارغا فلن يتم طباعة أية تعليمات.';
$string['changepassword'] = 'تغيير عنوان كلمة المرور';
$string['changepasswordhelp'] = 'هنا تستطيع تعيين الموضع الذي يمكن للمستخدمين من خلاله استرداد أو تغيير أسماء المستخدمين أو كلمات المرور الخاصة بهم في حالة نسيانها. وسوف يكون ذلك متاحا للمستخدمين من خلال زر في صفحة الدخول وصفحة المستخدم الخاصة بهم. أما إذا تركت هذا المكان خاليا، فلن يتم طباعة الزر.';
$string['chooseauthmethod'] = 'اختر أسلوبا للتوثيق: ';
$string['guestloginbutton'] = 'زر دخول الضيف';
$string['instructions'] = 'تعليمات';
$string['md5'] = 'تشفير MD5';
$string['plaintext'] = 'نص عادي';
$string['showguestlogin'] = 'يمكنك إظهار أو إخفاء زر دخول الضيف في صفحة الدخول.';
?>
<?PHP // $Id$
// auth.php - created with Moodle 1.2 development (2004012800)
$string['auth_dbdescription'] = 'يستخدم هذا الأسلوب جدول بيانات خارجي للتحقق من صحة اسم المستخدم وكلمة المرور. وفي حالة الحسابات الجديدة فقد يتم نسخ المعلومات من الحقول الأخرى أيضا ونقلها إلى نظام Moodle.';
$string['auth_dbextrafields'] = 'هذه الحقول اختيارية، ويمكنك ملء بعض حقول المستخدم في نظام Moodle مسبقا بالمعلومات من <B>حقول البيانات الخارجية</B> التي تقوم بتحديدها هنا. <P>إذا تركت هذه الأماكن فارغة فسوف يتم اختيار الأوضاع الافتراضية.<P>وفي كل الأحوال، فسوف يتمكن المستخدم من تعديل كل تلك الحقول بعد الدخول.';
$string['auth_dbfieldpass'] = 'اسم الحقل المشتمل على كلمات المرور';
$string['auth_dbfielduser'] = 'اسم الحقل المشتمل على أسماء المستخدمين';
$string['auth_dbhost'] = 'هذا الحاسب يستضيف مزود قاعدة البيانات.';
$string['auth_dbname'] = 'اسم قاعدة البيانات ذاتها';
$string['auth_dbpass'] = 'كلمة المرور المطابقة لاسم المستخدم المذكور';
$string['auth_dbpasstype'] = 'حدّد الشّكل الذي يستخدمه حقل كلمة السّر. تشفير MD5 مفيد للتّوصيل تطبيقات الويب الشّائعة الأخرى مثل PostNuke';
$string['auth_dbtable'] = 'اسم الجدول في قاعدة البيانات';
$string['auth_dbtitle'] = 'استخدم قاعدة بيانات خارجية';
$string['auth_dbtype'] = 'نوع قاعدة البيانات (أنظر <A HREF=../lib/adodb/readme.htm#drivers>ADOdb documentation</A> للمزيد من التفاصيل';
$string['auth_dbuser'] = 'اسم المستخدم مع حق الدخول على قاعدة البيانات للقراءة فقط';
$string['auth_emaildescription'] = 'يتم التوثيق عادة عبر البريد الإلكتروني، وهو الوضع الافتراضي لأسلوب التوثيق. فعندما يقوم المستخدم بالتوقيع وباختيار اسم المستخدم وكلمة المرور الخاصة به يتم إرسال رسالة توكيدية إلى عنوانه البريدي. ويحتوي البريد الإلكتروني على رابطة آمنة تؤدي إلى صفحة يستطيع المستخدم من خلالها توكيد اشتراكه. وفي حالة الدخول فيما بعد يتم التحقق من اسم المستخدم وكلمة المرور بمقابلتها بالمخزنة في قاعدة بيانات نظام Moodle..';
$string['auth_emailtitle'] = 'توثيق يتم عن طريق البريد الإلكتروني';
$string['auth_imapdescription'] = 'يستخدم هذا الأسلوب مزود IMAP للتحقق من صحة اسم المستخدم وكلمة المرور.';
$string['auth_imaphost'] = 'عنوان مزود IMAP. استخدم رقم البروتوكول لا اسم النطاق.';
$string['auth_imapport'] = 'رقم منفذ مزود IMAP . يكون في الغالب 143 أو 993.';
$string['auth_imaptitle'] = 'استخدم مزود IMAP';
$string['auth_imaptype'] = 'نوع مزود IMAP . من الممكن لمزودات IMAP أن تكون لديها أنواع مختلفة من التوثيق والتفاوض.';
$string['auth_ldap_bind_dn'] = 'إذا أردت استخدام وظيفة bind-user للبحث عن مستخدمين فيمكنك تعيين ذلك هنا، كأن تحدد مثلا: \'cn=ldapuser,ou=public,o=org\'';
$string['auth_ldap_bind_pw'] = 'كلمة مرور bind-user';
$string['auth_ldap_contexts'] = 'قائمة السياقات الموجود بها المستخدمين، حيث يفصل بين كل سياق وآخر بفاصلة هكذا: \'ou=users,o=org; ou=others,o=org\'';
$string['auth_ldap_create_context'] = 'لو مكّنت إنشاء المستخدم بتأكيد البريد الإلكترونيّ, حدّد السّياق إنشاء مستخدمون . يجب أن يكون هذا السّياق مختلف عن المستخدمين الآخرين لمنع القضايا الأمنيّة . لا تحتاج لإضافة هذا السّياق سياق الـمتغير(ldap_context-variable) مودل سيبحث عن المستخدمين من هذا السّياق تلقائيًّا ';
$string['auth_ldap_creators'] = 'قائمة الجماعات التى يُسْمَح لأعضائها القيام بانشاء مناهج دراسية جديدة. أفصل بين الجماعات المتعدّدة بـ \";\" عادة على الشكل التالي (cn=teachers,ou=staff,o=myorg)';
$string['auth_ldap_host_url'] = 'حدد مضيف برتوكول الدخول على الدليل الخفيف LDAPفي شكل عنوان إنترنت مثل \'ldap://ldap.myorg.com/\' أو \'ldaps://ldap.myorg.com/\' ';
$string['auth_ldap_memberattribute'] = 'حدد صفة العضو المستخدم، عندما ينتمي المستخدمون لمجموعة. عادة \"عضو\"';
$string['auth_ldap_search_sub'] = 'ضع قيمة &lt;&gt; 0 إذا أردت أن تبحث عن مستخدمين من سياقات فرعية.';
$string['auth_ldap_update_userinfo'] = 'تحديث معلومات المستخدم (الاسم الأول، الاسم الأخير، العنوان، …) من برتوكول الدخول على الدليل الخفيف LDAPإلى نظام Moodle . أنظر /auth/ldap/attr_mappings.php للحصول على معلومات عن التخطيط';
$string['auth_ldap_user_attribute'] = 'الوصف المستخدم لتسمية/البحث عن المستخدمين، وغالبا ما يكون \'cn\'.';
$string['auth_ldapdescription'] = 'هذا الأسلوب يقدم التوثيق في مقابل مزود خارجي لبروتوكول الدخول على الدليل الخفيف LDAP.
إذا كان كل من اسم المستخدم وكلمة المرور صحيحا فإن نظام Moodle يقوم بإنشاء إدخال مستخدم جديد في قاعدة بياناته. ويمكن لهذه الوحدة النمطية قراءة سمات المستخدم من بروتوكول الدخول على الدليل الخفيف LDAP وملء الحقول المطلوبة في نظام Moodle . ولا يحتاج عند الدخول لاحقا سوى إلى التحقق من اسم المستخدم وكلمة المرور.';
$string['auth_ldapextrafields'] = 'هذه الحقول اختيارية، ويمكنك ملء بعض حقول المستخدم في نظام Moodle مسبقا بالمعلومات من <B>حقول LDAP </B> التي تقوم بتحديدها هنا. <P>إذا تركت هذه الحقول فارغة فلن يتم نقل أي شيء من بروتوكول الدخول على الدليل الخفيف LDAP ، بل يتم استخدام الأوضاع الافتراضية الموجودة بنظام Moodle.<P>وفي كل الأحوال، فسوف يتمكن المستخدم من تعديل كل تلك الحقول بعد الدخول.';
$string['auth_ldaptitle'] = 'استخدم مزود LDAP';
$string['auth_manualdescription'] = 'يعطل هذا الاسلوب جميع الطرق التي تمكن المستخدمين من انشاء حساباتهم. جميع الحسابات لا بد ان تنشاء يدوياً من قبل المدير';
$string['auth_manualtitle'] = 'الحسابات اليدوية فقط';
$string['auth_multiplehosts'] = 'يمكن تحديد اكثر من مستضيف مواقع (host1.com, host2.net, host3.org)';
$string['auth_nntpdescription'] = 'هذا الأسلوب يستخدم مزود بروتوكول الشبكة لنقل الأخبار NNTP للتأكد من صحة اسم المستخدم وكلمة المرور.';
$string['auth_nntphost'] = 'عنوان مزود بروتوكول الشبكة لنقل الأخبار NNTP. استخدم رقم البروتوكول لا اسم النطاق.';
$string['auth_nntpport'] = 'منفذ المزود (119 هو الأكثر شيوعا)';
$string['auth_nntptitle'] = 'استخدم مزود NNTP';
$string['auth_nonedescription'] = 'يمكن للمستخدمين التوقيع ثم إنشاء حسابات صحيحة على الفور، دون حاجة للتوثيق في مقابل مزود خارجي أو إلى التوكيد من خلال البريد الإلكتروني. ينصح بالحرص عن استخدام هذا الخيار - وتدير عواقب مشاكل الحماية والإدارة التي قد تنتج عنه.';
$string['auth_nonetitle'] = 'لا يوجد توثيق';
$string['auth_pop3description'] = 'يستخدم هذا الأسلوب مزود برتوكول مكتب البريد3 POP3 للتأكد من صحة اسم المستخدم وكلمة المرور.';
$string['auth_pop3host'] = 'عنوان مزود برتوكول مكتب البريد3 POP3. استخدم رقم البروتوكول لا اسم النطاق.';
$string['auth_pop3port'] = 'منفذ المزود (110 هي الأكثر شيوعا)';
$string['auth_pop3title'] = 'استخدم مزود POP3';
$string['auth_pop3type'] = 'نوع المزود. إذا كان مزودك يستخدم حماية الشهادة، قم باختيار pop3cert.';
$string['auth_user_create'] = 'تمكين إنشاء مستخدم';
$string['auth_user_creation'] = 'يستطيع المستخدمون الجدد أو (المجهولون) انشاء حسابات على مصدر التوثيق الخارجيّ و تأكيّد التسجيل عبر بريد إلكترونيّ . إذا أنت مكنت هذه الخاصيه, أذن تذكّر أن توفّق بين الخيارات ذات المركبة المحدّدة لإنشاء المستخدم أيضًا';
$string['auth_usernameexists'] = 'الاسم المختار موجود، الرجاء اختيار اسم اخر';
$string['authenticationoptions'] = 'خيارات التوثيق';
$string['authinstructions'] = 'هنا يمكنك إعطاء تعليمات للمستخدمين لديك حتى يعرفوا أسماء المستخدمين وكلمات المرور التي يتعين عليهم استخدامها. سيظهر النص الذي تقوم بإدخاله هنا على صفحة الدخول. إذا تركت هذا المكان فارغا فلن يتم طباعة أية تعليمات.';
$string['changepassword'] = 'تغيير عنوان كلمة المرور';
$string['changepasswordhelp'] = 'هنا تستطيع تعيين الموضع الذي يمكن للمستخدمين من خلاله استرداد أو تغيير أسماء المستخدمين أو كلمات المرور الخاصة بهم في حالة نسيانها. وسوف يكون ذلك متاحا للمستخدمين من خلال زر في صفحة الدخول وصفحة المستخدم الخاصة بهم. أما إذا تركت هذا المكان خاليا، فلن يتم طباعة الزر.';
$string['chooseauthmethod'] = 'اختر أسلوبا للتوثيق: ';
$string['guestloginbutton'] = 'زر دخول الضيف';
$string['instructions'] = 'تعليمات';
$string['md5'] = 'تشفير MD5';
$string['plaintext'] = 'نص عادي';
$string['showguestlogin'] = 'يمكنك إظهار أو إخفاء زر دخول الضيف في صفحة الدخول.';
+15 -11
View File
@@ -1,7 +1,9 @@
<?PHP // $Id$
// calendar.php - created with Moodle 1.4 development (2004062401)
// calendar.php - created with Moodle 1.3 development (2004041800)
$string['april'] = 'ÃÈÑíá / äíÓÇä';
$string['august'] = 'ÃÛÓØÓ / ÂÈ';
$string['calendar'] = 'ÊÞæíã';
$string['calendarheading'] = '$a ÊÞæíã';
$string['clickhide'] = 'ÃäÞÑ ááÇÎÝÇÁ';
@@ -10,44 +12,48 @@ $string['confirmeventdelete'] = '
$string['courseevents'] = 'ÃÍÏÇË ÇáãäåÌ ÇáÏÑÇÓí';
$string['dayview'] = 'ãÚÇíäÉ íæãíÉ';
$string['daywithnoevents'] = 'áÇ ÊæÌÏ ÇÍÏÇË áåÐÇ Çáíæã';
$string['december'] = 'ÏíÓãÈÑ / ßÇäæä ÇáÃæá';
$string['default'] = 'ÅÝÊÑÇÖí';
$string['deleteevent'] = 'ÇÍÐÝ ÇáÍÏË';
$string['detailedmonthview'] = 'ãÚÇíäÉ ÔåÑíÉ ãÝÕá';
$string['durationminutes'] = 'ÇáãÏÉ ÈÇáÏÞÇÆÞ';
$string['durationnone'] = 'ÈÏæä ãÏÉ ÒãäíÉ';
$string['durationnone'] = 'ÈÏæä ÝÊÑÉ ÒãäíÉ';
$string['durationuntil'] = 'ÍÊì';
$string['editevent'] = 'ÊÍÑíÑ ÍÏË';
$string['errorbeforecoursestart'] = 'áÇ íãßä ÊÚííä ÍÏË ÞÈá ÊÇÑíÎ ÈÏÇÁ ÇáãäåÌ ÇáÏÑÇÓí';
$string['errorinvaliddate'] = 'ÊÇÑíÎ ÛíÑ ÕÍíÍ';
$string['errorinvalidminutes'] = 'ÍÏÏ ÇáãÏÉ ÈÇáÏÞÇÆÞ æÐáß ÈæÖÚ ÑÞã ãÇ Èíä 1-99';
$string['errorinvalidrepeats'] = 'ÍÏÏÚÏÏ ÇáÃÍÏÇË æÐáß ÈæÖÚ ÑÞã ãÇ Èíä 1-99';
$string['errornodescription'] = 'ÇáæÕÝ ãØáæÈ';
$string['errornoeventname'] = 'ÇáÇÓã ãØáæÈ';
$string['eventdate'] = 'ÊÇÑíÎ';
$string['eventdescription'] = 'æÕÝ';
$string['eventduration'] = 'ãÏÉ ÒãäíÉ';
$string['eventduration'] = 'ÝÊÑÉ ÒãäíÉ';
$string['eventendtime'] = 'æÞÊ ÇáÇäÊåÇÁ';
$string['eventinstanttime'] = 'æÞÊ';
$string['eventkind'] = 'äæÚ ÇáÍÏË';
$string['eventname'] = 'ÇÓã';
$string['eventrepeat'] = 'ÊßÑÇÑ';
$string['eventsfor'] = '$a ÇÍÏÇË';
$string['eventstarttime'] = 'æÞÊ ÇáÈÏÇÁ';
$string['eventtime'] = 'æÞÊ';
$string['eventview'] = 'ÊÝÇÕíá ÇáæÞÊ';
$string['expired'] = 'ÇäÊåì';
$string['february'] = 'ÝÈÑÇíÑ / ÔÈÇØ';
$string['fri'] = 'ÇáÌãÚÉ';
$string['friday'] = 'ÇáÌãÚÉ';
$string['globalevents'] = 'ÃÍÏÇË ÔÇãáå';
$string['gotocalendar'] = 'ÅÐåÈ Åáì ÇáÊÞæíã';
$string['groupevents'] = 'ÃÍÏÇË ãÌãæÚÉ';
$string['hidden'] = 'ãÎÝí';
$string['january'] = 'íäÇíÑ / ßÇäæä ÇáËÇäí';
$string['july'] = 'íæáíæ / ÊãæÒ';
$string['june'] = 'íæäíæ / ÍÒíÑÇä';
$string['manyevents'] = '$a ÃÍÏÇË';
$string['march'] = 'ãÇÑÓ / ÂÐÇÑ';
$string['may'] = 'ãÇíæ / äæøÇÑ';
$string['mon'] = 'ÇáÇËäíä';
$string['monday'] = 'ÇáÇËäíä';
$string['monthlyview'] = 'ãÚÇíäÉ ÔåÑíÉ';
$string['newevent'] = 'ÍÏË ÌÏíÏ';
$string['noupcomingevents'] = 'áÇ íæÌÏ ÃÍÏÇË ÞÇÏãÉ';
$string['november'] = 'äæÝãÈÑ / ÊÔÑíä ÇáËÇäí';
$string['october'] = 'ÃõßúÊæÈóÑ / ÊÔÑíä ÇáÃæá';
$string['oneevent'] = 'ÍÏË æÇÍÏ';
$string['pref_lookahead'] = 'ãÚÇíäÉ ÇáÇÍÏÇË ÇáÞÇÏãÉ';
$string['pref_maxevents'] = 'ÇáÍÏ ÇáÇÞÕì ááÃÍÏÇË ÇáÞÇÏãÉ';
@@ -55,11 +61,9 @@ $string['pref_startwday'] = '
$string['pref_timeformat'] = 'ÕíÛÉ ÚÑÖ ÇáæÞÊ';
$string['preferences'] = 'ÊÝÖíáÇÊ';
$string['preferences_available'] = 'ÊÝÖíáÇÊß ÇáÔÎÕíÉ';
$string['repeatnone'] = 'áÇ ÊßÑÇÑ';
$string['repeatweeksl'] = 'ßÑÑ ÇÓÈæÚíÇð¡ ÃäÔÆ ÇáÌãíÚ';
$string['repeatweeksr'] = 'ÃÍÏÇË';
$string['sat'] = 'ÇáÓÈÊ';
$string['saturday'] = 'ÇáÓÈÊ';
$string['september'] = 'ÓÈÊãÈÑ / Ãíáæá';
$string['shown'] = 'ÚõÑÖ';
$string['spanningevents'] = 'ÇáÃÍÏË ÇáÞÇÏãÉ';
$string['sun'] = 'ÇáÇÍÏ';
-1
View File
@@ -177,7 +177,6 @@ $string['PL'] = '
$string['PM'] = 'ÓÇäÊ ÈííÑ æãíßæáæä';
$string['PN'] = 'ÈÊßÇíÑä';
$string['PR'] = '(ÈæíÑÊæÑíßæ( ÇáæáÇíÇÊ ÇáãÊÍÏÉ ';
$string['PS'] = 'Palestine';
$string['PT'] = 'ÇáÈÑÊÛÇá';
$string['PW'] = 'ÈÇáÇæ';
$string['PY'] = 'ÈÇÑÇÌæÇí';
+2 -8
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// editor.php - created with Moodle 1.4 development (2004062401)
// editor.php - created with Moodle 1.3 development (2004041800)
$string['about'] = 'Íæá åÐÇ ÇáãÍÑÑ';
@@ -27,7 +27,6 @@ $string['cut'] = '
$string['delete'] = 'ÃÍÐÝ';
$string['filebrowser'] = 'ãÓÊÚÑÖ ÇáãáÝ';
$string['forecolor'] = 'áæä ÇáÎØ';
$string['fullscreen'] = 'ãÍÑÑ ÈßÇãá ÇáÔÇÔÉ';
$string['heading'] = 'ÚäæÇä';
$string['height'] = 'Ùáá';
$string['hilitecolor'] = 'áæä ÇáÎáÝíÉ';
@@ -48,7 +47,6 @@ $string['justifyleft'] = '
$string['justifyright'] = 'ÖÈØ Çáíãíä';
$string['layout'] = 'ÊÎØíØ';
$string['left'] = 'íÓÇÑ';
$string['lefttoright'] = 'ÇÊÌÇå ÇáäÕ ãä ÇáíÓÇÑ Åáì Çáíãíä';
$string['linkproperties'] = 'ÎÕÇÆÕ ÑÇÈØ';
$string['linktarget'] = 'åÏÝ';
$string['linktargetblank'] = 'äÇÝÐå ÌÏíÏÉ';
@@ -59,7 +57,6 @@ $string['linktargettop'] = '
$string['linktitle'] = 'ÚäæÇä';
$string['linkurl'] = 'ãæÌÉ ÑÇÈØ';
$string['middle'] = 'æÓØ';
$string['minimize'] = 'ÊÕÛíÑ ÇáãÍÑÑ';
$string['move'] = 'ÍÑß';
$string['normal'] = 'ÚÇÏí';
$string['notimage'] = 'ÇáãáÝ ÇáãÎÊÇÑ áíÓ ÕæÑÉ. ÇáÑÌÇÁ ÅÎÊíÇÑ ÕæÑÉ';
@@ -79,10 +76,8 @@ $string['redo'] = '
$string['removelink'] = 'ÇÓÊÈÚÇÏ ÇáÑÇÈØ';
$string['rename'] = 'ÅÚÇÏÉ ÊÓãíÉ';
$string['right'] = 'íãíä';
$string['righttoleft'] = 'ÇÊÌÇå ÇáäÕ ãä Çáíãíä Åáì ÇáíÓÇÑ';
$string['rows'] = 'ÕÝæÝ';
$string['selectcolor'] = 'ÇÎÊÑ Çááæä';
$string['selection'] = 'ÇÎÊíÇÑ';
$string['selection'] = 'ãÎÊÇÑ';
$string['showhelp'] = 'ÇáãÓÇÚÏÉ áÓÊÎÏÇã ÇáãÍÑÑ';
$string['size'] = 'ÍÌã';
$string['spacing'] = 'ÇáãÓÇÝÉ Èíä ÇáÇÓØÑ';
@@ -100,7 +95,6 @@ $string['unorderedlist'] = '
$string['upload'] = 'ÊÍãíá';
$string['vertical'] = 'ÚãæÏíø/ ÑÃÓí';
$string['width'] = 'ÚÑÖ';
$string['wordclean'] = 'äÙÝ ãíßÑæ ÓæÝ æÑÑÏ ÊÔ Êí Åã Ãá';
$string['zip'] = 'ÖÛØ';
?>
+6 -6
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// error.php - created with Moodle 1.4 development (2004062401)
// error.php - created with Moodle 1.3 development (2004041800)
$string['coursegroupunknown'] = 'ÇáãäåÌ ÇáãÊØÇÈÞ ãÚ ÇáãÌãæÚÉ $a áã íÍÏÏ';
@@ -7,15 +7,15 @@ $string['erroronline'] = '
$string['fieldrequired'] = '\"$a\" ÍÞá ãØáæÈ';
$string['groupalready'] = 'ÇáãÓÊÎÏã íäÊãí ááãÌãæÚÉ $a';
$string['groupunknown'] = 'ÇáãÌãæÚÉ $a áÇ íÑÊÈØ ÈÃí ãäåÌ ÏÑÇÓí ãÍÏÏ';
$string['invalidfieldname'] = '\"$a\" ÇÓã ÇáÍÞá ÛíÑ ÕÍíÍ';
$string['invalidfieldname'] = '\"$a\" ÇÓã ÇáÍÞá ÛíÑ ÕÍíÍ';
$string['missingfield'] = 'ÇáÍÞá \"$a\" ÛíÑ ãæÌæÏ';
$string['modulerequirementsnotmet'] = 'ÇáæÍÏ \" $a->modulename\" ($a->moduleversion) áÇíãßä ÊËÈÊåÇ ÇáÂä. ÃäåÇ ÊÊØáÈ ÃÕÏÇÑ ÌÏíÏ áãæÏá
(ÃäÊ ÊÓÊÎÏã ÇáÂä $a->currentmoodle, æÊÍÊÇÌ $a ->requiremoodle)
';
$string['notavailable'] = 'ÛíÑ ãÊæÝÑ ÍÇáíÇ';
$string['restricteduser'] = 'ÚÐÑÇ¡ ÍÓÇÈß ÇáÍÇáí \"$a\" áÇ íÎæáß ááÞíÇã ÈÐáß';
$string['unknowncourse'] = 'ÇÓã ÇáãäåÌ ÇáÏÑÇÓí ÛíÑ ãÚÑæÝ \"$a\"';
$string['usernotaddederror'] = 'ÇáãÓÊÎÏã \"$a\" áã íÊã ÅÖÇÝÊå - ÎØÇÁ ÛíÑ ãÚÑæÝ';
$string['usernotaddedregistered'] = 'ÇáãÓÊÎÏã \"$a\" - íÊã ÊÓÌíáå ãÓÈÞÇð';
$string['restricteduser'] = 'ÚÐÑÇ¡ ÃäÊ áÓÊ ãÎæáÇ ááÞíÇã ÈÐáß ÍÇáíÇð';
$string['unknowncourse'] = 'ÇÓã ÇáãäåÌ ÇáÏÑÇÓí ÛíÑ ãÚÑæÝ\"$a\"';
$string['usernotaddederror'] = 'ÇáãÓÊÎÏã\"$a\" áã íÊã ÇÖÇÝÉ- ÎØÇÁ ÛíÑ ãÚÑæÝ';
$string['usernotaddedregistered'] = 'ÇáãÓÊÎÏã\"$a\" áã íÊã ÇÖÇÝÉ- Êã ÊÓÌíáÉ ãä ÞÈá';
?>
+1 -12
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// forum.php - created with Moodle 1.4 development (2004062401)
// forum.php - created with Moodle 1.3 development (2004041800)
$string['addanewdiscussion'] = 'ÃÖÝ ãæÖæÚÇ ÌÏíÏÇ ááäÞÇÔ';
@@ -24,12 +24,8 @@ $string['delete'] = '
$string['deleteddiscussion'] = 'Êã ÍÐÝ ãæÖæÚ ÇáäÞÇÔ';
$string['deletedpost'] = 'Êã ÍÐÝ åÐå ÇáãÞÇáÉ';
$string['deletesure'] = 'åá ÃäÊ ãÊÃßÏ Ãäß ÊÑíÏ ÅáÛÇÁ ÍÐÝ åÐå ÇáãÔÇÑßÉ¿';
$string['digestmailprefs'] = 'áãÍÊß ÇáÔÎÕíÉ';
$string['digestmailsubject'] = '$a ãáÎÕ ãäÊÏì';
$string['digestsentusers'] = 'ÇáãáÎÕÇÊ ÇÑÓáÊ ÈäÌÇÍ ÈÇáÈÑíÏ ÇáÅáßÊÑæäí Åáì $a ÇáãÓÊÎÏãíä';
$string['discussion'] = 'äÞÇÔ';
$string['discussionmoved'] = 'Êã äÞá åÐÇ áäÞÇÔ Åáì \'$a\'';
$string['discussionname'] = 'ÇÓã ÇáäÞÇÔ';
$string['discussions'] = 'ãäÇÞÔÇÊ';
$string['discussionsstartedby'] = 'ÇáãäÇÞÔÇÊ ÈÏÃÊ ÈæÇÓØÉ $a';
$string['discussionsstartedbyrecent'] = 'ÇáãäÇÞÔÇÊ ÈÏÃÊ ÍÏíËÇ ÈæÇÓØÉ $a';
@@ -94,12 +90,8 @@ $string['postrating1'] = '
$string['postrating2'] = 'ÇáÇÊÕÇá æÇáÇäÝÕÇá ÓæÇÁ ';
$string['postrating3'] = 'ÊÙåÑ ãåÇÑÊå Ýí ÇáÛÇáÈ ÚäÏãÇ íßæä ãÊÕáÇ';
$string['posts'] = 'ãÔÇÑßÇÊ';
$string['posttoforum'] = 'ãÔÇÑßÉ Ýí ãäÊÏì';
$string['postupdated'] = 'Êã ÊÍÏíË ãÞÇáß ÇáãÑÓá';
$string['processingdigest'] = 'ÅÚÏÇÏ ÇáãáÕ ÇáÈÑíÏí ááãÓÊÎÏã $a';
$string['processingpost'] = 'ãÚÇáÌÉ ÇáÑÓÇáÉ $a';
$string['prune'] = 'ÌÒÇÁ';
$string['pruneheading'] = 'ÌÒÇÁ ÇáãÔÇÑßÉ æÇäÞáåÇ Åáì äÞÇÔ ÌÏíÏ';
$string['rate'] = 'ÕäÝ';
$string['rating'] = 'ÊÕäíÝ';
$string['ratingeveryone'] = 'ÇáÌãíÚ íÓÊØíÚ ÇáÊÕäíÝ';
@@ -128,9 +120,7 @@ $string['singleforum'] = '
$string['startedby'] = 'ÈÏÇÁ ÇáäÞÇÔ ÈæÇÓØÉ';
$string['subject'] = 'ÇáãæÖæÚ';
$string['subscribe'] = 'ÇÔÊÑß Ýí åÐÇ ÇáãäÊÏì';
$string['subscribeall'] = 'ÇÔÑß Çáßá Ýí åÐÇ ÇáãäÊÏì';
$string['subscribed'] = 'Êã ÇáÇÔÊÑÇß';
$string['subscribenone'] = 'ÇáÛì ÇÔÊÑÇß Çáßá ãä åÐÇ ÇáãäÊÏì';
$string['subscribers'] = 'ÇáãÔÊÑßæä';
$string['subscribersto'] = 'ÇáãÔÊÑßæä Ýí \' $a\' ';
$string['subscribestart'] = 'ÊÒæíÏí ÈäÓÎ ÇáãÔÇÑßÇÊ ãä åÐÇ ÇáãäÊÏì ÚÈÑ ÇáÈÑíÏ ÇáÇáßÊÑæäí';
@@ -139,7 +129,6 @@ $string['subscription'] = '
$string['subscriptions'] = 'ÇÔÊÑÇßÇÊ';
$string['unsubscribe'] = 'ÅáÛÇÁ ÇáÇÔÊÑÇß Ýí åÐÇ ÇáãäÊÏì';
$string['unsubscribed'] = 'ÅáÛÇÁ ÇáÇÔÊÑÇß';
$string['unsubscribeshort'] = 'ÇáÛí ÇáÇÔÊÑÇß';
$string['youratedthis'] = 'ÃäÊ ÕäÝÊ åÐÇ';
$string['yournewtopic'] = 'ãæÖæÚß ÇáÌÏíÏ ááãäÇÞÔÉ';
$string['yourreply'] = 'ÑÏß';
+1 -6
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// glossary.php - created with Moodle 1.4 development (2004062401)
// glossary.php - created with Moodle 1.3 development (2004041800)
$string['addcomment'] = 'ÃÖÝ ÊÚáíÞ';
@@ -68,7 +68,6 @@ $string['displayformat6'] = '
$string['displayformatcontinuous'] = 'ãÓÊãÑ ÈÏæä ßÇÊÈ';
$string['displayformatdefault'] = 'ÓÑÏ ãÚÌãí ãÈÓØ';
$string['displayformats'] = 'ÚÑÖ ÊäÓíÞÇÊ';
$string['displayformatssetup'] = 'ÃÚÑÖ ÅÚÏÇÏ ÇáÕíÛÇÊ';
$string['duplicateentry'] = 'ÊßÑÇÑ ÇáãÕØáÍ';
$string['editcategories'] = 'ÊÍÑíÑ ÇáÇÕäÇÝ';
$string['editentry'] = 'ÊÍÑíÑ ÇáãÕØáÍ';
@@ -82,7 +81,6 @@ $string['entryapproved'] = '
$string['entrydeleted'] = 'Êã ÍÐÝ ÇáãÕØáÍ';
$string['entryexported'] = 'Êã ÊÕÏíÑ ÇáãÕØáÍ ÈäÌÇÍ';
$string['entryishidden'] = '(åÐÇ ÇáãÕØáÍ ãÎÝíÉ ÍÇáíÇð)';
$string['entryleveldefaultsettings'] = 'ÇÅÚÏÇÏ ÇáÅÝÊÑÇÖí ááãÕØáÍ';
$string['entryusedynalink'] = 'íÌÈ ÑÈØ åÐÇ ÇáãÕØáÍ ÂáíÇ';
$string['explainaddentry'] = 'ÃÖÝ ãÕØáÍ ÌÏíÏÉ Åáì ÇáãÓÑÏ ÇáÍÇáí.<br> ÊÚÈÆÉ ÍÞáí ÇáãÝåæã æ ÇáÊÚÑíÝ ÅÌÈÇÑí';
$string['explainall'] = 'ÃÚÑÖ ÌãíÚ ÇáãÕØáÇÍÇÊ Ýí ÕÝÍÉ æÇÍÏÉ';
@@ -99,7 +97,6 @@ $string['filetoimport'] = '
$string['fillfields'] = 'ÍÞæá ÇáãÝåæã æÇáÊÚÑíÝ ÇÌÈÇÑíÉ';
$string['filtername'] = 'ÇáÑÈØ ÇáÂáí ááãÓÑÏ';
$string['fullmatch'] = 'ÞÇÑä ßá ÇáßáãÇÊ ÝÞØ';
$string['glossaryleveldefaultsettings'] = 'ÇáÅÚÏÇÏ ÇáÅÝÊÑÇÖí ááãÓÑÏ';
$string['glossarytype'] = 'äæÚ ÇáãÓÑÏ';
$string['glosssaryexported'] = 'Êã ÊÕÏíÑ ÇáãÓÑÏ';
$string['importcategories'] = 'ÇÓÊæÑÏ ÇáÝÆÇÊ';
@@ -154,8 +151,6 @@ $string['totalentries'] = '
$string['usedynalink'] = 'ÑÈØ ãÕØáÇÍÇÊ ÇáãÓÑÏ ÂáíÇ';
$string['waitingapproval'] = 'ÅäÊÙÇÑ ÇáãæÇÝÞÉ';
$string['warningstudentcapost'] = 'íäØÈÞ ÝÞØ ÅÐÇ áã íßä ÇáãÓÑÏ åæ ÇáãÓÑ ÇáÑÆíÓ';
$string['withauthor'] = 'ÇáãÝÇåíã ãÚ ÇáßÇÊÈ';
$string['withoutauthor'] = 'ÇáãÝÇåíã ÈÏæä ÇáßÇÊÈ';
$string['writtenby'] = '龂';
$string['youarenottheauthor'] = 'ÃäÊ áÓÊ ßÇÊÈ åÐÇ ÇáÊÚáíÞ¡ áÐÇ áä ÊÊãßä ãä ÊÍÑíÑå';
+1 -33
View File
@@ -1,18 +1,13 @@
<?PHP // $Id$
// lesson.php - created with Moodle 1.4 development (2004062401)
// lesson.php - created with Moodle 1.3 development (2004041800)
$string['addabranchtable'] = 'ÃÖÝ ÌÏæá ÝÑÚí';
$string['addanendofbranch'] = 'ÃÖÝ äåÇíÉ ÝÑÚ';
$string['addaquestionpage'] = 'ÃÖÝ ÓÄÇá Åáì ÇáÕÝÍÉ';
$string['answer'] = 'ÃÌÈ';
$string['attempt'] = 'ãÍÇæáÉ: $a';
$string['attempts'] = 'ãÍÇæáÇÊ';
$string['available'] = 'ãÊÇÍ ãä';
$string['branchtable'] = 'ÝÑÚ ÌÏæá';
$string['canretake'] = '$a íÓÊØíÚ ÅÚÇÏÉ ÃÎÐ';
$string['checkbranchtable'] = 'ÊÃßÏ ãä ÝÑÚ ÇáÌÏæá';
$string['checknavigation'] = 'ÊÃßÏ ãä ÑæÇÈØ ÇáÊäÞá';
$string['checkquestion'] = 'ÃÝÍÕ ÇáÓÄÇá';
$string['confirmdeletionofthispage'] = 'ÊÃßíÏ ÍÐÝ åÐå ÇáÕÝÍÉ';
$string['congratulations'] = 'ãÈÑæß - áÞÏ æÕáÊ Åáì äåÇíÉ ÇáÏÑÓ';
@@ -22,62 +17,35 @@ $string['deleting'] = '
$string['deletingpage'] = 'ÍÐÝ ÇáÕÝÍÉ: $a';
$string['description'] = 'æÕÝ';
$string['displayofgrade'] = 'ÃÚÑÖ ÇáÏÑÌÉ (ááØáÇÈ ÝÞØ)';
$string['endofbranch'] = 'äåÇíÉ ÊÝÑÚ';
$string['endoflesson'] = 'äåÇíÉ ÇáÏÑÓ';
$string['fileformat'] = 'ÕíÛÉ ãáÝ';
$string['gradeis'] = 'ÇáÏÑÌÉ åí $a';
$string['handlingofretakes'] = 'ÇáÊÚÇãá ãÚ ÅÚÇÏ ÇáÃÎÐ';
$string['here'] = 'åäÇÁ';
$string['importquestions'] = 'ÇÓÊíÑÇÏ ÇÓÆáÉ';
$string['jump'] = 'ÞÝÒ';
$string['maximumnumberofanswersbranches'] = 'ÇáÍÏ ÇáÃÞÕì áÚÏÏ ÇáÇÌÇÈÇÊ / ÇáÊÝÑíÚÇÊ';
$string['maximumnumberofattempts'] = 'ÇáÍÏ ÇáÃÞÕì áÚÏÏ ÇáãÍÇæáÇÊ';
$string['minimumnumberofquestions'] = 'ÇáÍÏ ÇáÃÞÕì áÚÏÏ ÇáÃÓÆáÉ';
$string['modulename'] = 'ÏÑÓ';
$string['modulenameplural'] = 'ÏÑæÓ';
$string['movepagehere'] = 'ÃäÞá ÇáÕÝÍÉ Åáì åäÇÁ';
$string['moving'] = 'äÞá ÇáÕÝÍÉ: a$';
$string['movingtonextpage'] = 'ÃáÇäÊÞÇá Åáì ÇáÕÝÍÉ ÇáÊÇáíÉ';
$string['multianswer'] = 'ãÊÚÏÏ ÇáÇÌÇÈÉ';
$string['multipleanswer'] = 'ãÊÚÏÏ ÇáÇÌÇÈÉ';
$string['nextpage'] = 'ÇáÕÝÍÉ ÇáÊáíÉ';
$string['noanswer'] = 'áã ÊÚØì ÅÌÇÈÉ';
$string['noattemptrecordsfound'] = 'áã íÊã ÇáÚ辄 Úáì Ãí ÓÌáÇÊ ááãÍÇæáÉ: áÐÇ áã ÊÚØì ÏÑÌÉ';
$string['normal'] = 'ÚÇÏí - ÊÇÈÚ ÇáÏÑÓ';
$string['notdefined'] = 'áã íÚÑÝ';
$string['notitle'] = 'áÇ íæÌÏ ÚäæÇä';
$string['numberofcorrectanswers'] = 'ÚÏÏ ÇáÇÌÇÈÇÊ ÇáÕÍíÍÉ: $a';
$string['numberofcorrectmatches'] = 'ÚÏÏ ÇáÇÌÇÈÇÊ ÇáÕÍíÕÉ ÇáãÊØÇÈÞÉ: $a';
$string['numberofpagestoshow'] = 'ÚÏÏ ÇáÕÝÍÇÊ (ÇáÈØÇÞÇÊ) ÇáÊí ÊÙåÑ: $a';
$string['numberofpagesviewed'] = 'ÚÏÏ ÇáÕÝÍÇÊ ÇáÊí Êã ãÔÇåÏÊåÇ: $a';
$string['ordered'] = 'ÑÊÈ';
$string['outof'] = 'ãä $a';
$string['page'] = 'ÕÝÍÉ: $a';
$string['pagecontents'] = 'ãÍÊæíÇÊ ÇáÕÝÍÉ';
$string['pages'] = 'ÕÝÍÇÊ';
$string['pagetitle'] = 'ÚäæÇä ÇáÕÝÍÉ';
$string['pleasecheckoneanswer'] = 'ÇáÑÌÇÁ ÇÎÊíÇÑ ÅÌÇÈÉ æÇÍÏÉ';
$string['pleasecheckoneormoreanswers'] = 'ÇáÑÌÇÁ ÇÎÊíÇÑ ÅÌÇÈÉ æÇÍÏÉ Ãæ ÃßËÑ';
$string['pleaseenteryouranswerinthebox'] = 'ÇáÑÌÇÁ ÅÏÎÇá ÅÌÇÈÊß Ýí ÇáÑÈÚ ÇáÍæÇÑí';
$string['pleasematchtheabovepairs'] = 'ÇáÑÌÇÁ ãÞÇÈáÉ ÇáÒæÌíä ÇáÓÇÈÞííä';
$string['questionoption'] = 'ÎíÇÑ ÇáÓÄÇá';
$string['questiontype'] = 'äæÚ ÇáÓÄÇá';
$string['reached'] = 'æÕáÊ';
$string['redisplaypage'] = 'ÅÚÇÏÉ ÚÑÖ ÇáÕÝÍÉ';
$string['response'] = 'ÅÌÇÈÉ';
$string['savepage'] = 'ÍÝÙÇáÕÝÍÉ';
$string['showanunansweredpage'] = 'ÃÙåÑ ÇáÕÝÍÉ ÇáÊí áã íÊã ÇáÅÌÇÈÉ ÚáíåÇ';
$string['showanunseenpage'] = 'ÃÙåÑ ÇáÕÝÍÉ ÇáÛíÑ ãÑÆíå';
$string['singleanswer'] = 'ÅÌÇÈÉ ãÝÑÏÉ';
$string['thatsthecorrectanswer'] = 'åÐå ÅÌÇÈÉ ÕÍÕÍÉ';
$string['thatsthewronganswer'] = 'åÐå ÅÌÇÈÉ ÎÇØÆÉ';
$string['thefollowingpagesjumptothispage'] = 'ÇáÕÝÍÇÊ ÇáÊÇáíÉ ÊÞÝÒ Åáì åÐå ÇáÕÝÍÉ';
$string['thispage'] = 'åÐå ÇáÕÝÍÉ';
$string['useeditor'] = 'ÇÓÊÎÏã ÇáãÍÑÑ';
$string['usemaximum'] = 'ÇÓÊÎÏã ÇáÍÏ ÇáÃÞÕì';
$string['usemean'] = 'ÇÓÊÎÏã ÇáãÊæÓØ ÇáÍÓÇÈí';
$string['youranswer'] = 'ÅÌÇÈß';
$string['yourcurrentgradeis'] = 'ÏÑÌÊß ÇáÍÇáíÉ åí $a';
$string['youshouldview'] = 'Úáì ÇáÃÞá íãßäß ãÔÇåÏÉ $a';
?>
+10 -23
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// moodle.php - created with Moodle 1.4 development (2004060400)
// moodle.php - created with Moodle 1.3 development (2004041800)
$string['action'] = 'إجراء';
@@ -42,7 +42,7 @@ $string['adminhelpcourses'] = '
$string['adminhelpedituser'] = 'استعرض قائمة حسابات المستخدمين وحرر أي منهم';
$string['adminhelplanguage'] = 'لمراجعة وتحرير حزمة اللغة الحالية';
$string['adminhelplogs'] = 'استعراض سجلات جميع الأنشطة بالموقع';
$string['adminhelpmanageblocks'] = 'ادر الكتل المثبته وإعداداتها';
$string['adminhelpmanageblocks'] = 'ادر القوالب المثبته وإعداداتها';
$string['adminhelpmanagedatabase'] = '(الوصول المباشر إلى قاعدة البيانات كن حذر!)';
$string['adminhelpmanagefilters'] = 'اختر منقحات النص و الإعدادات المشابهه';
$string['adminhelpmanagemodules'] = 'أدر الوحدات المثبتة وإعداداتهم';
@@ -101,11 +101,9 @@ $string['backupsavetohelp'] = '
$string['backupuserfileshelp'] = 'اختر لو كنت ترغب في إضافة ملفات المستخدم(مثل: صور اللمحه الشخصية) ضمن النسخ الاحتياطي الآلي';
$string['backupusershelp'] = 'اختر لو كنت ترغب في إضافة جميع المستخدمين في الخادم أو المستخدمين المطلوبين لكل منهج دراسي فقط';
$string['backupversion'] = 'إصدار النسخة الإحتياطية';
$string['blocks'] = 'كتل';
$string['blocksetup'] = 'إعداد جداول الكتلة';
$string['blocksetup'] = 'إعداد جداول القالب';
$string['blocksuccess'] = '$a تم إعداد الجداول بشكل صحيح';
$string['bycourseorder'] = 'حسب ترتيب المنهج الدراسي';
$string['byname'] = 'بواسطة $a';
$string['cancel'] = 'إلغاء';
$string['categories'] = 'تصنيف المناهج الدراسية ';
$string['category'] = 'الصنف';
@@ -214,7 +212,6 @@ $string['currentcourseadding'] = '
$string['currentcoursedeleting'] = 'حذف المنهج الدراسي الحالي أولاً';
$string['currentlanguage'] = 'اللغة الحالية';
$string['currentlocaltime'] = 'التوقيت المحلي الحالي';
$string['currentpicture'] = 'الصورة الحالية';
$string['currentrelease'] = 'معلومات الأصدار الحالي';
$string['currentversion'] = 'الأصدار الحالي';
$string['databasechecking'] = 'تحديث قاعدة بيانات Moodle من نسخة $a->oldversion إلى $a->newversion...';
@@ -222,7 +219,7 @@ $string['databaseperformance'] = '
$string['databasesetup'] = 'تنصيب قاعدة البيانات';
$string['databasesuccess'] = 'تم تحديث قاعدة البيانات بنجاح';
$string['databaseupgradebackups'] = 'النسخ الإحتياطي للإصدرا الآن $a';
$string['databaseupgradeblocks'] = 'إصدار الكتل الان هو $a';
$string['databaseupgradeblocks'] = 'إصدار القوالب الان هو $a';
$string['databaseupgrades'] = 'تحديث قاعدة البيانات';
$string['datemostrecentfirst'] = 'التاريخ - الاحدث أولاً';
$string['datemostrecentlast'] = 'التاريخ - الاحدث أخراً';
@@ -266,7 +263,6 @@ $string['downloadtext'] = '
$string['doyouagree'] = 'هل قمت بقراءة هذه الشروط واستيعابها؟';
$string['edit'] = 'حرر $a';
$string['editcoursesettings'] = 'حرر إعدادات المنهج الدراسي';
$string['editfiles'] = 'حرر الملفات';
$string['editgroupprofile'] = 'تحرير سمات المجموعة';
$string['editinga'] = 'تحرير $a';
$string['editmyprofile'] = 'حرر ملف البيانات';
@@ -319,8 +315,8 @@ $string['emailpasswordsent'] = '
<p>كلمة السر الجديد إنشئت آليا، ربما ترغب في
<a href=$a->link>غير كلمة السر الخاصة بك</a>إلي شئ تستطيع تذكره';
$string['enable'] = 'تمكين';
$string['enrolledincourse'] = 'مسجل في المنهج الدراسي ';
$string['enrolledincoursenot'] = 'غير مسجل في المنهج الدراسي ';
$string['enrolledincourse'] = 'مسجل في المنهج الدراسي \"$a\"';
$string['enrolledincoursenot'] = 'غير مسجل في المنهج الدراسي \"$a\"';
$string['enrolmentconfirmation'] = 'انت على وشك التسجيل كعضو في هذ المنهج الدراسي
<br />هل أنت متأكد من ذلك؟';
$string['enrolmentkey'] = 'مفتاح التسجيل';
@@ -391,7 +387,6 @@ $string['grades'] = '
$string['group'] = 'مجموعة';
$string['groupadd'] = 'أضف مجموعة جديدة';
$string['groupaddusers'] = 'أضف المختار إلى المجموعة';
$string['groupfor'] = 'للمجموعة';
$string['groupinfo'] = 'معلومات عن المجموعة المختارة';
$string['groupinfomembers'] = 'معلومات عن الاعضاء المختارين';
$string['groupinfopeople'] = 'معلومات عن الناس المختارين';
@@ -428,9 +423,6 @@ $string['helpsummaries'] = '
$string['helptext'] = 'كيفية كتابة نص';
$string['helpwiki'] = 'كيف تكتب نص بإستخدام ويكي';
$string['helpwriting'] = 'أكتب بدقة';
$string['hiddensections'] = 'المواضيع المخفيه';
$string['hiddensectionscollapsed'] = 'الأجزاء المحفية تم إظهارها في هيئة منطوية';
$string['hiddensectionsinvisible'] = 'الأجزاء المحفية غير مرئيه تماماً';
$string['hide'] = 'إخفاء';
$string['hidepicture'] = 'إخفاء الصورة';
$string['hits'] = 'نتائج';
@@ -457,7 +449,6 @@ $string['included'] = '
$string['includelogentries'] = 'تضمين مداخل السجلات';
$string['includemodules'] = 'تضمين الوحدات';
$string['includeneededusers'] = 'تضمين المستخدمين المحتاج لهم';
$string['includenoneusers'] = 'اضف غير المستخدمين';
$string['includeuserfiles'] = 'تضمين ملفات المستخدم';
$string['institution'] = 'مؤسسة';
$string['invalidemail'] = 'عنوان البريد الإلكتروني غير صحيح';
@@ -481,7 +472,7 @@ $string['list'] = '
$string['listfiles'] = 'قائمة الملفات في $a';
$string['listofallpeople'] = 'قائمة بجميع الأشخاص';
$string['livelogs'] = 'تقارير عن الساعة الأخيرة';
$string['locale'] = 'en';
$string['locale'] = 'ar_AR';
$string['location'] = 'الموقع';
$string['loggedinas'] = 'تم دخولك بصفة $a';
$string['loggedinnot'] = 'لم يتم دخولك.';
@@ -499,7 +490,7 @@ $string['loginsteps'] = '
<LI>والآن قم باختيار المنهج الدراسي الذي ترغب المشاركة فيه.
<LI>من الآن فصاعدا يمكنك الدخول عن طريق إدخال اسم المستخدم وكلمة المرور (في النموذج المقابل بهذه الصفحة) ، وتستطيع الاتصال الكامل بالمنهج الدراسي ، وتصل إلى أي منهج دراسي تريد التسجيل به.
<LI>إذا طلب منك \'\'مفتاح التسجيل\'\' - استخدم المفتاح الذي أعطاه لك المدرس. هذا سيجعلك \'\'تشارك\'\' في المنهج الدراسي.
<LI> لا حظ أن كل منهج دراسي قد يكون له أيضا \"مفتاح تسجيل\" ستحتاج إليه لاحقا.
<LI> لا حظ أن كل منهج دراسي قد يكون له أيضا &quot;مفتاح تسجيل&quot; ستحتاج إليه لاحقا.
</OL>';
$string['loginstepsnone'] = 'مرحبا!<P>للاتصال الكامل بالمناهج الدراسية ستحتاج إلى إنشاء اشتراك جديد.<P>كل ما عليك هو عمل اسم مستخدم وكلمة مرور واستخدامهما في النموذج الموجود بهذه الصفحة!<P>إذا كان اسم المستخدم قد تم استخدامه من قبل، جرب مرة أخرى اسما آخر.';
$string['loginto'] = 'دخول إلى $a';
@@ -509,7 +500,7 @@ $string['logs'] = '
$string['mainmenu'] = 'القائمة الرئيسية';
$string['makeafolder'] = 'إنشاء مجلد';
$string['makeeditable'] = 'إذا جعلت \'$a\' قابلا للتعديل من خلال عملية مزود الإنترنت (مثال apache) ثم تستطيع تعديل هذا الملف مباشرة من خلال هذه الصفحة';
$string['manageblocks'] = 'كتل';
$string['manageblocks'] = 'قوالب';
$string['managedatabase'] = 'إدارة قاعدة البيانات';
$string['managefilters'] = 'منقحات';
$string['managemodules'] = 'وحدات';
@@ -773,7 +764,6 @@ $string['strftimedateshort'] = '%%d %%B';
$string['strftimedatetime'] = '%%d %%B %%Y, %%I:%%M %%p';
$string['strftimedaydate'] = '%%A, %%d %%B %%Y';
$string['strftimedaydatetime'] = '%%A, %%d %%B %%Y, %%I:%%M %%p';
$string['strftimemonthyear'] = '%%B %%Y';
$string['strftimerecent'] = '%%d %%b, %%H:%%M';
$string['strftimerecentfull'] = '%%a, %%d %%b %%Y, %%I:%%M %%p';
$string['strftimetime'] = '%%I:%%M %%p';
@@ -797,7 +787,7 @@ $string['themes'] = '
$string['themesaved'] = 'تم حفظ الشكل الجديد';
$string['thischarset'] = 'windows-1256';
$string['thisdirection'] = 'rtl';
$string['thislanguage'] = 'عربي';
$string['thislanguage'] = '&#1593;&#1585;&#1576;&#1610;';
$string['time'] = 'الوقت';
$string['timezone'] = 'المنطقة الزمنية';
$string['to'] = 'إلى';
@@ -814,8 +804,6 @@ $string['turneditingoff'] = '
$string['turneditingon'] = 'تشغيل التحرير';
$string['undecided'] = 'غير محدد';
$string['unenrol'] = 'إلغاء التسجيل';
$string['unenrolallstudents'] = 'إلغاء تسجيل جميع الطلاب';
$string['unenrolallstudentssure'] = 'هل أنت متأكد من القيام بإلغاء تسجيل جميع الطلاب تماما من هذا المنهج الدراسي؟';
$string['unenrolme'] = 'إلغاء تسجيلي من $a';
$string['unenrolsure'] = 'هل أنت متأكد أنك تريد إلغاء التسجيل $a من هذا المنهج الدراسي?';
$string['unknowncategory'] = 'صنف غير معروف';
@@ -841,7 +829,6 @@ $string['uploadnotallowed'] = '
$string['uploadproblem'] = 'حصل خطاء غير معروف أثناء تحميل الملف. $a(ربما حجم الملف كبيرجداُ?)';
$string['uploadthisfile'] = 'تحميل هذا الملف';
$string['uploadusers'] = 'تحميل مستخدمون';
$string['usedinnplaces'] = 'استخدم في $a ';
$string['user'] = 'مستخدم';
$string['userconfirmed'] = 'تم تأكيد $a';
$string['userdata'] = 'معلومات المستخدم';
+4 -5
View File
@@ -27,7 +27,7 @@ Si us voleu fer c
http://www.softcatala.org/projectes/eines/guiaestil/guiaestil.htm
http://www.softcatala.org/projectes/eines/recull/recull.htm
3. Que sigueu usuaris habituals del mòdul en qüestió.
3. Que sigueu usuaris habituals i experiments del mòdul en qüestió.
4. Que us comprometeu a mantenir i actualitzar la traducció durant un
temps.
@@ -55,12 +55,11 @@ quiz.php No assignat
resource.php CENT
scheduler.php No assignat
scorm.php CENT
survey.php No assignat
wiki.php CENT
survey.php No assignat
workshop.php No assignat
admin.php CENT
auth.php CENT
admin.php CENT
auth.php CENT
calendar.php CENT
countries.php CENT
editor.php CENT
-10
View File
@@ -1,10 +0,0 @@
<?PHP // $Id$
// block_course_list.php - created with Moodle 1.4 development (2004060400)
$string['allcourses'] = 'L\'administrador veu tots els cursos';
$string['blockname'] = 'Llista de cursos';
$string['configadminview'] = 'Configuració de la visualització de l\'administrador';
$string['owncourses'] = 'L\'administrador veu els seus cursos';
?>
+1 -2
View File
@@ -1,8 +1,7 @@
<?PHP // $Id$
// block_course_summary.php - created with Moodle 1.4 development (2004070800)
// block_course_summary.php - created with Moodle 1.3 development (2004041800)
$string['blockname'] = 'Resum del curs';
$string['siteinfo'] = 'Informació del lloc';
?>
-111
View File
@@ -1,111 +0,0 @@
<?PHP // $Id$
// calendar.php - created with Moodle 1.3 (2004052500)
$string['april'] = 'abril';
$string['august'] = 'agost';
$string['calendar'] = 'Calendari';
$string['calendarheading'] = 'Calendari $a';
$string['clickhide'] = 'feu clic per ocultar';
$string['clickshow'] = 'feu clic per mostrar';
$string['confirmeventdelete'] = 'Esteu segur que voleu suprimir aquest esdeveniment?';
$string['courseevents'] = 'Esdeveniments del curs';
$string['dayview'] = 'Visualització del dia';
$string['daywithnoevents'] = 'Aquest dia no té esdeveniments.';
$string['december'] = 'desembre';
$string['default'] = 'Per defecte';
$string['deleteevent'] = 'Suprimeix esdeveniment';
$string['detailedmonthview'] = 'Visualització detallada del mes';
$string['durationminutes'] = 'Durada en minuts';
$string['durationnone'] = 'Sense durada';
$string['durationuntil'] = 'Fins';
$string['editevent'] = 'S\'està editant l\'esdeveniment';
$string['errorbeforecoursestart'] = 'No es pot definir l\'esdeveniment abans de la data d\'inici del curs';
$string['errorinvaliddate'] = 'La data no és vàlida';
$string['errorinvalidminutes'] = 'Especifiqueu la durada en minuts (entre 1 i 999).';
$string['errorinvalidrepeats'] = 'Especifiqueu el nombre d\'esdeveniments (entre 1 i 999).';
$string['errornodescription'] = 'La descripció és necessària';
$string['errornoeventname'] = 'El nom és necessari';
$string['eventdate'] = 'Data';
$string['eventdescription'] = 'Descripció';
$string['eventduration'] = 'Durada';
$string['eventendtime'] = 'Final';
$string['eventinstanttime'] = 'Hora';
$string['eventkind'] = 'Tipus d\'esdeveniment';
$string['eventname'] = 'Nom';
$string['eventrepeat'] = 'Es repeteix';
$string['eventsfor'] = 'Esdeveniments $a';
$string['eventstarttime'] = 'Data d\'inici';
$string['eventtime'] = 'Hora';
$string['eventview'] = 'Informació sobre l\'esdeveniment';
$string['expired'] = 'Ha vençut';
$string['explain_lookahead'] = 'Aquesta preferència defineix el nombre (màxim) de dies que falten per a l\'esdeveniment per tal que es visualitzi com un esdeveniment pròxim. Si us plau teniu en compte que <strong>no es garanteix</strong> que es visualitzin tots els esdeveniments que comencen en aquest lapse; si n\'hi ha massa (més que la preferència \"Nombre màxim d\'esdeveniments pròxims\") aleshores els esdeveniments més llunyans no es mostraran.';
$string['explain_maxevents'] = 'Aquesta preferència defineix el nombre màxim d\'esdeveniments pròxims que es pot visualitzar. Si trieu aquí un nombre gran, és possible que la visualització dels esdeveniments pròxims ocupi molt d\'espai de pantalla.';
$string['explain_startwday'] = 'Aquesta preferència configura el mode de visualització de tots els calendaris mensuals. Useu-la per visualitzar-los al vostre gust.';
$string['explain_timeformat'] = 'Podeu triar de veure l\'hora en format de 12 o 24 hores. Si trieu \"per defecte\", aleshores el format es determinarà automàticament segons les convencions de l\'idioma del lloc.';
$string['february'] = 'febrer';
$string['fri'] = 'dv';
$string['friday'] = 'divendres';
$string['globalevents'] = 'Esdeveniments globals';
$string['gotocalendar'] = 'Vés al calendari';
$string['groupevents'] = 'Esdeveniments de grup';
$string['hidden'] = 'ocult';
$string['january'] = 'gener';
$string['july'] = 'juliol';
$string['june'] = 'juny';
$string['manyevents'] = '$a esdeveniments';
$string['march'] = 'març';
$string['may'] = 'maig';
$string['mon'] = 'dl';
$string['monday'] = 'dilluns';
$string['monthlyview'] = 'Visualització del mes';
$string['newevent'] = 'Nou esdeveniment';
$string['noupcomingevents'] = 'No hi ha esdeveniments pròxims.';
$string['november'] = 'novembre';
$string['october'] = 'octubre';
$string['oneevent'] = 'un esdeveniment';
$string['pref_lookahead'] = 'Esdeveniments pròxims';
$string['pref_maxevents'] = 'Nombre màxim d\'esdeveniments pròxims';
$string['pref_startwday'] = 'Primer dia de la setmana';
$string['pref_timeformat'] = 'Format de visualització de l\'hora';
$string['preferences'] = 'Preferències';
$string['preferences_available'] = 'Preferències personals';
$string['repeatnone'] = 'No es repeteix';
$string['repeatweeksl'] = 'Es repeteix cada setmana, crea ara';
$string['repeatweeksr'] = 'esdeveniments';
$string['sat'] = 'ds';
$string['saturday'] = 'dissabte';
$string['september'] = 'setembre';
$string['shown'] = 'mostrat';
$string['spanningevents'] = 'Esdeveniments en marxa';
$string['sun'] = 'dg';
$string['sunday'] = 'diumenge';
$string['thu'] = 'dj';
$string['thursday'] = 'dijous';
$string['timeformat_12'] = '12 hores (am/pm)';
$string['timeformat_24'] = '24 hores';
$string['today'] = 'Avui';
$string['tomorrow'] = 'Demà';
$string['tt_deleteevent'] = 'Suprimeix esdeveniment';
$string['tt_editevent'] = 'Edita esdeveniment';
$string['tt_hidecourse'] = 'S\'estan mostrant els esdeveniments del curs (feu clic per ocultar)';
$string['tt_hideglobal'] = 'S\'estan mostrant els esdeveniments globals (feu clic per ocultar)';
$string['tt_hidegroups'] = 'S\'estan mostrant els esdeveniments de grup (feu clic per ocultar)';
$string['tt_hideuser'] = 'S\'estan mostrant els esdeveniments de l\'usuari (feu clic per ocultar)';
$string['tt_showcourse'] = 'Els esdeveniments del curs estan ocults (feu clic per mostrar)';
$string['tt_showglobal'] = 'Els esdeveniments globals estan ocults (feu clic per mostrar)';
$string['tt_showgroups'] = 'Els esdeveniments de grup estan ocults (feu clic per mostrar)';
$string['tt_showuser'] = 'Els esdeveniments de l\'usuari estan ocults (feu clic per mostrar)';
$string['tue'] = 'dt';
$string['tuesday'] = 'dimarts';
$string['typecourse'] = 'Esdeveniment del curs';
$string['typegroup'] = 'Esdeveniment de grup';
$string['typesite'] = 'Esdeveniment del lloc';
$string['typeuser'] = 'Esdeveniment de l\'usuari';
$string['upcomingevents'] = 'Esdeveniments pròxims';
$string['userevents'] = 'Esdeveniments de l\'usuari';
$string['wed'] = 'dc';
$string['wednesday'] = 'dimecres';
$string['yesterday'] = 'Ahir';
?>
+3 -3
View File
@@ -1,5 +1,5 @@
<?PHP // $Id$
// chat.php - created with Moodle 1.3 (2004052500)
// chat.php - created with Moodle 1.2 Beta (2004022400)
$string['beep'] = 'bip';
@@ -12,7 +12,7 @@ $string['configrefreshroom'] = 'Freq
$string['configrefreshuserlist'] = 'Freqüència de refresc de la llista d\'usuaris (en segons)';
$string['currentchats'] = 'Sessions de xat actives';
$string['currentusers'] = 'Usuaris actuals';
$string['deletesession'] = 'Suprimeix aquesta sessió';
$string['deletesession'] = 'Suprimir aquesta sessió';
$string['deletesessionsure'] = 'Esteu segur que voleu suprimir aquesta sessió?';
$string['donotusechattime'] = 'No publiquis el dia i hora dels xats';
$string['enterchat'] = 'Feu clic aquí per entrar al xat';
@@ -38,6 +38,6 @@ $string['seesession'] = 'Visualitza aquesta sessi
$string['sessions'] = 'Sessions de xat';
$string['strftimemessage'] = '%%H:%%M';
$string['studentseereports'] = 'Tothom pot veure les sessions anteriors';
$string['viewreport'] = 'Visualitza les sessions de xat anteriors';
$string['viewreport'] = 'Vissualitza les sessions de xat anteriors';
?>
+6 -15
View File
@@ -1,24 +1,16 @@
<?PHP // $Id$
// choice.php - created with Moodle 1.4 development (2004062600)
// choice.php - created with Moodle 1.2 Beta (2004022400)
$string['allowupdate'] = 'Permet actualitzar la consulta';
$string['answered'] = 'Contestades';
$string['choice'] = 'Opció $a';
$string['choiceclose'] = 'Fins';
$string['choicename'] = 'Títol de la consulta';
$string['choiceopen'] = 'Oberta';
$string['choicetext'] = 'Text de la consulta';
$string['modulename'] = 'Consulta';
$string['modulenameplural'] = 'Consultes';
$string['mustchooseone'] = 'Heu de triar una resposta abans de desar. No s\'ha desat res.';
$string['choicename'] = 'Títol de la qüestió';
$string['choicetext'] = 'Text de la qüestió';
$string['modulename'] = 'Qüestió';
$string['modulenameplural'] = 'Qüestions';
$string['mustchooseone'] = 'Heu de triar una respostar abans de desar. No s\'ha desat res.';
$string['notanswered'] = 'No contestada encara';
$string['notopenyet'] = 'Aquesta activitat no està disponible fins el $a';
$string['privacy'] = 'Confidencialitat dels resultats';
$string['publish'] = 'Publica els resultats';
$string['publishafteranswer'] = 'Mostra els resultats als estudiants després que contestin';
$string['publishafterclose'] = 'Mostre els resultats als estudiants quan es tanqui la consulta';
$string['publishalways'] = 'Mostra sempre els resultats als estudiants';
$string['publishanonymous'] = 'Publica els resultats anònimament, sense mostrar els noms dels estudiants';
$string['publishnames'] = 'Publica els resultats complets, amb els noms dels estudiants i les seves respostes';
$string['publishnot'] = 'No publiquis els resultats';
@@ -26,7 +18,6 @@ $string['responses'] = 'Respostes';
$string['responsesto'] = 'Respostes per a $a';
$string['savemychoice'] = 'Desa la meva resposta';
$string['showunanswered'] = 'Mostra columna de no contestades';
$string['timerestrict'] = 'Limita les respostes a aquest període de temps';
$string['viewallresponses'] = 'Visualitza $a respostes';
?>
+4 -4
View File
@@ -13,8 +13,8 @@
<h1>Introducci&oacute;</h1>
<blockquote>
<p>Moodle &eacute;s un paquet de programari per a creaci&oacute; de cursos basats en internet i llocs web. &Eacute;s un projecte de desenvolupament en marxa, dissenyat per donar suport a un marc educatiu <a href="?file=philosophy.html">constructivista social</a>. </p>
<p>Moodle es distribueix lliurement com a programari de <a href="http://www.opensource.org/docs/definition_plain.html" target="_top">codi font obert</a> (sota la <a href="http://www.gnu.org/copyleft/gpl.html" target="_top">Llic&egrave;ncia P&uacute;blica GNU</a>). B&agrave;sicament aix&ograve; significa que Moodle t&eacute; drets d'autor (copyright), per&ograve; l'usuari gaudeix de llibertats addicionals. Se us permet copiar, utilitzar i modificar Moodle sempre que: <strong>faciliteu el codi a altres</strong>; <strong>no modifiqueu o suprimiu la llic&egrave;ncia i el copyright original</strong> i <strong>apliqueu la mateixa llic&egrave;ncia a qualsevol producte derivat</strong>. Per a m&eacute;s informaci&oacute; llegiu la llic&egrave;ncia i contacteu si us plau directament amb el <a href="http://moodle.org/user/view.php?id=1&amp;course=1">propietari dels drets</a> si teniu cap pregunta.
<p>Moodle &eacute;s un paquet de programari per a creaci&oacute; de cursos basats en internet i llocs web. &Eacute;s un projecte de desenvolupament en marxa, dissenyat per donar suport a un marc educatiu <a href="?file=philosophy.html">construccionista social</a>. </p>
<p>Moodle es distribueix lliurement com a programari de <a href="http://www.opensource.org/docs/definition_plain.html" target="_top">codi font obert</a> (sota la <a href="http://www.gnu.org/copyleft/gpl.html" target="_top">Llic&egrave;ncia P&uacute;blica GNU</a>). B&agrave;sicament aix&ograve; significa que Moodle t&eacute; drets d'autor (copyright), per&ograve; l'usuari gaudeix de llibertats addicionals. Se us permet copiar, utilitzar i modificar Moodle sempre que: <strong>faciliteu el codi a altres</strong>; <strong>no modifiqueu o suprimiu la llic&egrave;ncia i el copyright original</strong>, i <strong>apliqueu la mateixa llic&egrave;ncia a qualsevol producte derivat</strong>. Per a m&eacute;s informaci&oacute; llegiu la llic&egrave;ncia i contacteu si us plau directament amb el <a href="http://moodle.org/user/view.php?id=1&amp;course=1">propietari dels drets</a> si teniu cap pregunta.
</p>
<p>Moodle funcionar&agrave; en qualsevol ordinador que pugui executar <a href="http://www.php.net/" target="_top">PHP</a> i &eacute;s compatible amb molts tipus de bases de dades (particularment <a href="http://www.mysql.com/" target="_top">MySQL</a>).</p>
<p>El mot Moodle era originalment un acr&ograve;nim de Modular Object-Oriented Dynamic Learning Environment (Entorn d'Aprenentatge Din&agrave;mic i Modular Orientat a l'Objecte), cosa que &eacute;s &uacute;til principalment a programadors i te&ograve;rics de l'educaci&oacute;. Tamb&eacute; &eacute;s un verb que descriu el proc&eacute;s de vagarejar ociosament, fent les coses a mesura que se us acudeixen: una manera de divertir-se joguinejant que tot sovint porta noves percepcions i creativitat. S'aplica, aix&iacute;, tant a l'estil de desenvolupament de Moodle com a una possible manera d'apropar-se l'estudiant a l'aprenentatge, o el professor a l'ensenyament, en un curs en l&iacute;nia. Aquell qui fa servir Moodle &eacute;s un Moodler.</p>
@@ -22,7 +22,7 @@
</blockquote>
<p><br>
</p>
<p align="CENTER"><font size="1"><a href="." target="_top">Documentaci&oacute; de Moodle</a></font></p>
<p align="CENTER"><font size="1"><a href="." target="_top">Documentaci de Moodle</a></font></p>
<p align="CENTER"><font size="1">Version: $Id$</font></p>
</body>
</html>
</html>

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