Compare commits

...

51 Commits

Author SHA1 Message Date
moodler f6641be6b7 Bumped version 2008-07-11 05:24:46 +00:00
skodak 726d8b5805 MDL-15450 CSRF prevention 2008-07-08 13:03:59 +00:00
skodak 04ea70175b MDL-15516 prevent access to profiles of deleted users; backported from HEAD 2008-07-05 15:02:10 +00:00
arborrow 4497e89c9f MDL-7571 - shuffles 'mode' before displaying, merged from MOODLE_18_STABLE 2008-07-04 22:28:20 +00:00
gbateson 4fc304ca82 MDL-15184: fix sql injection vulnerability 2008-07-01 10:44:23 +00:00
moodler 8fd3d38509 MDL-15413 Added some code to stop access to this page directly 2008-06-27 03:31:27 +00:00
moodler 6e6f33e6f2 MDL-15413 Added some code to prevent this script being run on it's own 2008-06-27 03:29:08 +00:00
scyrma 5104726b9f MDL-15392: fix output sanitization. 2008-06-25 03:56:59 +00:00
gbateson 97e2fee8d2 replace get_jmatch_items by set_jmatch_items 2008-06-20 22:26:04 +00:00
gbateson a9456360f9 allow <img> and other tags in LHS of JMatch in "v6" outputformat 2008-06-19 05:55:46 +00:00
gbateson 376a031f4c fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments) 2008-06-07 01:41:18 +00:00
mchurch 2c450e82d9 MDL-15035 - Changed error message to more meaningful one. 2008-05-28 14:59:47 +00:00
stronk7 7658e24915 Avoid $_REQUEST["id"] usage. MDL-14806 ; backported from 19_STABLE 2008-05-13 01:55:32 +00:00
tjhunt 60ec12e055 MDL-14804 - question_list_instances is broken - It does not include the each modules lib file before doing function_exists($module->name.'_question_list_instances'). 2008-05-12 17:29:52 +00:00
tjhunt be074bc3e6 MDL-14797 - Error when moving a course to an empty category on Postgres 2008-05-12 10:44:42 +00:00
moodler 0259eda698 New uz installer lang 2008-05-10 02:57:14 +00:00
tjhunt cfdfc85ddc MDL-14750 - Multianswer questions get broken by backup and restore becuase question->parent is not recoded properly in the database. 2008-05-09 15:22:46 +00:00
tjhunt 6fa56c54f3 MDL-5482 - Backup and restore problems for match, random and truefalse question types.
All the credit goes to Paulo Matos who carefully worked out and tested this fix, and updated the patch several times over more than a year while I very slowly got around to reviewing it and checking it in.
2008-05-07 12:31:58 +00:00
moodler c14c54c22a New lang supported by installer: cy_utf8 2008-05-04 00:42:16 +00:00
scyrma ae4b11cbfd MDL-8592: Get spellchecking to work over https (backport from 1.9) 2008-05-02 03:40:42 +00:00
gbateson f452e874bc removed setting of timeclose and timeopen when course format == "weeks" 2008-04-18 00:57:49 +00:00
nicolasconnault 21d1ce8edd MDL-13919 Fixed undefined variable 2008-03-13 14:01:08 +00:00
ethem 45d22afdcc Race condition in cron for Scheduled-Capture (very very big sites and order review enabled only).
In one cron, 250-500 orders may be processed (based on 5 minutes).
If an admin sets cron time up smaller than 5 minutes and
250-500> new transactions are made after last cron executed, it can be blocked.
Authorize cron sets up an_lastcron every time when admin/cron.php executes.
This must be set up after blocking check code.

As result, if pending orders aren't accepted with in 30 days at payment management page, they expired and users cannot enrol.
When an admin enabled order review, he is guaranteed 'Payment managers accept/deny transactions manually'.
Scheduled-Capture is designed for forgotten orders only ;)

Backported from HEAD.
2008-03-11 08:50:54 +00:00
pichetp 7f33aa0cd4 MDL-12503 Loguniform merging from head 2008-03-10 21:58:20 +00:00
gbateson df489b8217 add "mp3" (used by DewPlayer) to the list of query string parameters to search for when converting relative urls to absolute urls 2008-03-10 01:36:36 +00:00
skodak f19e9ea7e7 MDL-13705 2008-03-01 13:13:14 +00:00
skodak 48b31fcc65 MDL-13705 2008-02-28 21:19:54 +00:00
skodak 6a4fc5046f MDL-13705 2008-02-28 21:03:35 +00:00
moodler 947d915a8f Fix subject lines and corrupted emails from messages MDL-13364 (merged) 2008-02-07 05:22:52 +00:00
gbateson d37502617e MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:18:14 +00:00
nicolasconnault a22772f8e3 MDL-12158 Applied Matt's patch 2008-02-05 10:38:00 +00:00
gbateson 0b2f6d13cf fix odd escaping of quotes by "stripslashes()" on Windows server with MSSQL 2008-02-05 06:00:10 +00:00
gbateson 767e292319 MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:22:27 +00:00
gbateson 2c6041eb5a MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:08:54 +00:00
scyrma 94e5a9c78f MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:31 +00:00
gbateson 4b4b981562 fix for MDL-13174 : replace calls to html_entity_decode() with hotpot_charcode_to_utf8() because html_entity_decode is broken in PHP 4 2008-01-31 07:24:44 +00:00
scyrma b74bd9ce19 MDL-4218 - deprecatedlib.php doesn't exist in 1.6 2008-01-31 00:50:52 +00:00
tjhunt 2519a70a19 MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:41 +00:00
tjhunt 5ed379d713 Fix invalid XML in example file. 2008-01-30 17:24:42 +00:00
mchurch 5fbb72ba43 MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:52:19 +00:00
scyrma 7c0be404c8 Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages.  This commit also includes the restorelib upgrade path.
2008-01-30 07:45:43 +00:00
scyrma e724611042 Upgrade path for MDL-13060. 2008-01-29 05:51:46 +00:00
gbateson 5a66d54c05 fix for MDL-13173: quotes in HotPot activity name 2008-01-26 08:25:51 +00:00
nicolasconnault 58b037a501 MDL-4218 Added require_once deprecatedlib.php 2008-01-17 08:45:55 +00:00
nicolasconnault 71dbb2abb0 MDL-4218 Disabling the check for admin dir 2008-01-17 08:09:53 +00:00
nicolasconnault fdebc24f38 MDL-4218 Disabling the check for web root URL 2008-01-17 07:48:14 +00:00
Martin Langhoff 761ed63243 cvsimport fixups - related to the MOODLE_16_STABLE bogus force-move - binary 2008-01-14 08:53:41 +00:00
Martin Langhoff 378464df6a cvsimport fixups - related to the MOODLE_16_STABLE bogus force-move 2008-01-14 08:53:41 +00:00
moodler 8720c8d50c Moved to + after release 2008-01-14 08:53:41 +00:00
poltawski f7f5109386 MDL-8269 - stats wasn't paying attention to run time settings as the strtotime arguments were the wrong way round. Thanks to Mark Nielsen
backported from MOODLE_19_STABLE
2008-01-13 20:08:05 +00:00
skodak 71092feb39 MDL-12914 Register globals trouble; backported from MOODLE_19_STABLE 2008-01-11 23:29:23 +00:00
77 changed files with 1435 additions and 2903 deletions
+1 -1
View File
@@ -281,7 +281,7 @@
if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) {
// check we're not before our runtime
$timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today");
$timetocheck = strtotime("today $CFG->statsruntimestarthour:$CFG->statsruntimestartminute");
if (time() > $timetocheck) {
$time = 60*60*20; // set it to 20 here for first run... (overridden by $CFG)
+2 -2
View File
@@ -319,8 +319,8 @@
print_spacer(10,10);
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_simple_box(get_string('globalsquoteswarning', 'admin'), 'center', '60%');
if (ini_get_bool('register_globals')) {
print_simple_box(get_string('globalswarning', 'admin'), 'center', '60%');
}
if (is_dataroot_insecure()) {
+13
View File
@@ -1382,6 +1382,19 @@
$user->lang = 'mi_nt';
}
//Country list updates - MDL-13060
//Any user whose country code has been deleted or modified needs to be assigned a valid one.
$country_update_map = array(
'ZR' => 'CD',
'TP' => 'TL',
'FX' => 'FR',
'KO' => 'RS',
'CS' => 'RS',
'WA' => 'GB');
if (array_key_exists($user->country, $country_update_map)) {
$user->country = $country_update_map[$user->country];
}
//Check if it's admin and coursecreator
$is_admin = !empty($user->roles['admin']);
$is_coursecreator = !empty($user->roles['coursecreator']);
+4 -3
View File
@@ -7,7 +7,7 @@ class block_participants extends block_list {
}
function get_content() {
global $USER, $CFG;
global $USER, $CFG, $COURSE;
if ($this->content !== NULL) {
return $this->content;
@@ -27,13 +27,14 @@ class block_participants extends block_list {
$this->instance->pageid = SITEID;
}
if ($this->instance->pageid != SITEID ||
/// MDL-13252 Always get the course page id or else the id may be incorrect in the user/index.php
if ($COURSE->id != SITEID ||
$CFG->showsiteparticipantslist > 1 ||
($CFG->showsiteparticipantslist == 1 && isteacherinanycourse()) ||
isteacher(SITEID)) {
$this->content->items[] = '<a title="'.get_string('listofallpeople').'" href="'.
$CFG->wwwroot.'/user/index.php?id='.$this->instance->pageid.'">'.get_string('participants').'</a>';
$CFG->wwwroot.'/user/index.php?id='.$COURSE->id.'">'.get_string('participants').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="" />';
}
+4
View File
@@ -1,5 +1,9 @@
<?php // $Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
/**
* Definition of blog page type.
*/
+2 -2
View File
@@ -155,9 +155,9 @@
global $USER, $CFG, $course, $ME;
$template['body'] = get_formatted_entry_body($blogEntry->summary, $blogEntry->format);
$template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
$template['title'] = '<a name="'. s($blogEntry->subject, true) .'"></a>';
//enclose the title in nolink tags so that moodle formatting doesn't autolink the text
$template['title'] .= '<span class="nolink">'. $blogEntry->subject;
$template['title'] .= '<span class="nolink">'. strip_tags(format_string($blogEntry->subject, true));
$template['title'] .= '</span>';
$template['userid'] = $blogEntry->userid;
$template['author'] = fullname(get_record('user','id',$blogEntry->userid));
+1 -1
View File
@@ -1847,7 +1847,7 @@ function move_courses ($courseids, $categoryid) {
// figure out a sortorder that we can use in the destination category
$sortorder = get_field_sql('SELECT MIN(sortorder)-1 AS min
FROM ' . $CFG->prefix . 'course WHERE category=' . $categoryid);
if ($sortorder === false) {
if (is_null($sortorder) || $sortorder === false) {
// the category is empty
// rather than let the db default to 0
// set it to > 100 and avoid extra work in fix_coursesortorder()
+5 -1
View File
@@ -1,5 +1,9 @@
<?php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
$courses = get_courses('all','c.shortname','c.id,c.shortname,c.fullname');
$courseoptions = array();
@@ -139,4 +143,4 @@
print_table($table);
}
?>
?>
+5 -3
View File
@@ -437,7 +437,8 @@ class enrolment_plugin_authorize
$captureday = intval($frm->an_capture_day);
$emailexpired = intval($frm->an_emailexpired);
if ($captureday > 0 || $emailexpired > 0) {
if ((time() - intval($mconfig->an_lastcron) > 3600 * 24)) {
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if ((time() - intval($lastcron) > 3600 * 24)) {
notify(get_string('admincronsetup', 'enrol_authorize'));
}
}
@@ -510,7 +511,8 @@ class enrolment_plugin_authorize
$emailexpired = ($emailexpired > 5) ? 5 : (($emailexpired < 0) ? 0 : $emailexpired);
if (!empty($reviewval) && ($captureday > 0 || $emailexpired > 0)) {
if (time() - intval($mconfig->an_lastcron) > 3600 * 24) {
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if (time() - intval($lastcron) > 3600 * 24) {
return false;
}
}
@@ -710,7 +712,6 @@ class enrolment_plugin_authorize
$timediff30 = $settlementtime - (30 * $oneday);
$mconfig = get_config('enrol/authorize');
set_config('an_lastcron', $timenow, 'enrol/authorize');
mtrace("Processing authorize cron...");
@@ -751,6 +752,7 @@ class enrolment_plugin_authorize
mtrace("blocked");
return;
}
set_config('an_lastcron', $timenow, 'enrol/authorize');
mtrace(" $ordercount orders are being processed now", ": ");
-54
View File
@@ -1,54 +0,0 @@
<?PHP // $Id$
/**
* backup_authorize_info
*
* @param resource $bf
* @param object $prefs
* @return bool
*/
function backup_authorize_info($bf, $prefs)
{
global $CFG;
$status = true;
if ($orders = get_records("enrol_authorize", "courseid", $prefs->backup_course))
{
fwrite($bf, start_tag("AUTHORIZEORDERS", 2 ,true));
foreach ($orders as $order) {
fwrite($bf, start_tag("ORDER", 3, true));
fwrite($bf, full_tag("ID", 4, false, $order->id));
fwrite($bf, full_tag("CCLASTFOUR", 4, false, $order->cclastfour));
fwrite($bf, full_tag("CCNAME", 4, false, $order->ccname));
fwrite($bf, full_tag("COURSEID", 4, false, $order->courseid));
fwrite($bf, full_tag("USERID", 4, false, $order->userid));
fwrite($bf, full_tag("TRANSID", 4, false, $order->transid));
fwrite($bf, full_tag("STATUS", 4, false, $order->status));
fwrite($bf, full_tag("TIMECREATED", 4, false, $order->timecreated));
fwrite($bf, full_tag("SETTLETIME", 4, false, $order->settletime));
fwrite($bf, full_tag("AMOUNT", 4, false, $order->amount));
fwrite($bf, full_tag("CURRENCY", 4, false, $order->currency));
if ($refunds = get_records("enrol_authorize_refunds", "orderid", $order->id)) {
fwrite($bf, start_tag("REFUNDS",4, true));
foreach ($refunds as $refund) {
fwrite($bf, start_tag("REFUND", 5, true));
fwrite($bf, full_tag("ID", 6, false, $refund->id));
fwrite($bf, full_tag("ORDERID", 6, false, $refund->orderid));
fwrite($bf, full_tag("STATUS", 6, false, $refund->status));
fwrite($bf, full_tag("AMOUNT", 6, false, $refund->amount));
fwrite($bf, full_tag("TRANSID", 6, false, $refund->transid));
fwrite($bf, full_tag("SETTLETIME", 6, false, $refund->settletime));
fwrite($bf, end_tag("REFUND", 5, true));
}
$status = fwrite($bf, end_tag("REFUNDS", 4, true));
}
fwrite ($bf, end_tag("ORDER", 3, true));
}
$status = fwrite($bf, end_tag("AUTHORIZEORDERS", 2, true));
}
return $status;
}
?>
+1
View File
@@ -1594,6 +1594,7 @@ function grade_get_stats($category='all') {
// returns a comma seperated list of the most common values in $items, $items is expected to be a comma sperated list of numbers
function grade_mode($items) {
$all_scores = explode(',',$items);
shuffle($all_scores); //MDL-7571 - shuffle scores
foreach($all_scores as $value) {
if (isset($frequency[$value])) {
$frequency[$value]++;
+2 -2
View File
@@ -217,7 +217,7 @@ if ($INSTALL['stage'] == DIRECTORY) {
error_reporting(0);
/// check wwwroot
if (ini_get('allow_url_fopen')) {
if (ini_get('allow_url_fopen') && false) { /// This was not reliable
if (($fh = @fopen($INSTALL['wwwrootform'].'/install.php', 'r')) === false) {
$errormsg .= get_string('wwwrooterror', 'install').'<br />';
$INSTALL['wwwrootform'] = $INSTALL['wwwroot'];
@@ -375,7 +375,7 @@ if ($INSTALL['stage'] == DATABASE) {
/// If we can open a file then we know that the admin name is correct.
if ($nextstage == ADMIN or $INSTALL['stage'] == ADMIN) {
if (!ini_get('allow_url_fopen')) {
if (!ini_get('allow_url_fopen') || true) { // MDL-4218 fopen URL is not reliable
$nextstage = ($goforward) ? ENVIRONMENT : DATABASE;
} else if (($fh = @fopen($INSTALL['wwwrootform'].'/'.$INSTALL['admindirname'].'/site.html', 'r')) !== false) {
$nextstage = ($goforward) ? ENVIRONMENT : DATABASE;
+335
View File
@@ -0,0 +1,335 @@
<?php
/// Please, do not edit this file manually! It's auto generated from
/// contents stored in your standard lang pack files:
/// (langconfig.php, install.php, moodle.php, admin.php and error.php)
///
/// If you find some missing string in Moodle installation, please,
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Mae cyfeiriadur y gweinyddwr a roddwyd yn anghywir';
$string['admindirname'] = 'Cyfeiriadur y Gweinyddwr';
$string['admindirsetting'] = 'Nifer fach iawn o westeiwyr gwe sy\'n defnyddio /admin fel URL arbennig i chi gael mynd i mewn i\'r
panel rheoli neu beth bynnag. Yn anffodus, mae hyn yn gwrthdaro â
lleoliad safonol tudalennau gweinyddol Moodle. Gallwch drwsio hyn drwy
ailenwi cyfeiriadur y gweinyddwr wrth osod y rhaglen, a rhoi\'r
enw newydd yma. Er enghraifft: <br /> <br /><b>gweinyddmoodle</b><br /> <br />
Bydd hyn yn trwsio\'r dolenni gweinyddol yn Moodle.';
$string['admindirsettinghead'] = 'Gosod cyfeiriadur y gweinyddwr...';
$string['admindirsettingsub'] = 'Nifer fach iawn o westeiwyr gwe sy\'n defnyddio /admin fel URL arbennig i chi gael mynd i mewn i\'r
panel rheoli neu beth bynnag. Yn anffodus, mae hyn yn gwrthdaro â
lleoliad safonol tudalennau gweinyddol Moodle. Gallwch drwsio hyn drwy
ailenwi cyfeiriadur y gweinyddwr wrth osod y rhaglen, a rhoi\'r
enw newydd yma. Er enghraifft: <br /> <br /><b>gweinyddmoodle</b><br /> <br />
Bydd hyn yn trwsio dolenni gweinyddol yn Moodle.';
$string['availablelangs'] = 'Y pecynnau iaith sydd ar gael';
$string['bypassed'] = 'Pasio Heibio';
$string['cannotcreatelangdir'] = 'Does dim modd creu cyfeiriadur iaith.';
$string['cannotcreatetempdir'] = 'Does dim modd creu cyfeiriadur dros dro.';
$string['cannotdownloadcomponents'] = 'Does dim modd llwytho cydrannau i lawr.';
$string['cannotdownloadzipfile'] = 'Does dim modd llwytho ffeil ZIP i lawr.';
$string['cannotfindcomponent'] = 'Does dim modd canfod cydran.';
$string['cannotsavemd5file'] = 'Does dim modd cadw ffeil md5.';
$string['cannotsavezipfile'] = 'Does dim modd cadw ffeil ZIP.';
$string['cannotunzipfile'] = 'Does dim modd dadzipio\'r ffeil.';
$string['caution'] = 'Gofal';
$string['check'] = 'Gwirio';
$string['chooselanguage'] = 'Dewiswch iaith';
$string['chooselanguagehead'] = 'Dewis iaith';
$string['chooselanguagesub'] = 'Dewiswch iaith ar gyfer y broses osod YN UNIG. Gallwch ddewis yr iaith ar gyfer y safle ac ar gyfer defnyddwyr yn nes ymlaen ar sgrin arall.';
$string['closewindow'] = 'Cau\'r ffenstr hon';
$string['compatibilitysettings'] = 'Wrthi\'n profi eich gosodiadau PHP ...';
$string['compatibilitysettingshead'] = 'Wrthi\'n profi eich gosodiadau PHP ...';
$string['compatibilitysettingssub'] = 'Dylai\'ch gweinydd basio\'r holl brofion hyn fel bod Moodle yn rhedeg yn llwyddiannus';
$string['componentisuptodate'] = 'Mae\'r gydran wedi\'i diweddaru.';
$string['configfilenotwritten'] = 'Nid oedd y sgript gosod wedi llwyddo i greu ffeil config.php yn awtomatig a oedd yn cynnwys eich gosodiadau personol, fwy na thebyg oherwydd na ellir ysgrifennu dros y cyfeiriadur Moodle. Gallwch gopïo\'r cod canlynol eich hun i ffeil o\'r enw config.php yng nghyfeiriadur gwraidd Moodle.';
$string['configfilewritten'] = 'Wedi llwyddo i greu\'r ffeil config.php yn llwyddiannus';
$string['configurationcomplete'] = 'Wedi gorffen ffurfweddu';
$string['configurationcompletehead'] = 'Wedi gorffen ffurfweddu';
$string['configurationcompletesub'] = 'Ceisiodd Moodle gadw eich ffurfwedd mewn ffeil yng ngwraidd eich rhaglen Moodle.';
$string['continue'] = 'Bwrw ymlaen';
$string['curlrecommended'] = 'Argymhellir yn gryf eich bod yn gosod y llyfrgell Curl ddewisol fel bo Rhwydweithio Moodle yn gallu gweithio.';
$string['customcheck'] = 'Archwiliadau Eraill';
$string['database'] = 'Cronfa ddata';
$string['databasecreationsettings'] = 'Nawr, bydd angen i chi ffurfweddu gosodiadau\'r gronfa ddata lle y caiff y rhan fwyaf o ddata Moodle ei storio. Caiff y gronfa ddata hon ei chreu\'n awtomatig gan y rhaglen osod
â\'r gosodiadau a roddir isod.<br />
<br /> <br />
<b>Math:</b> wedi\'i osod i \"mysql\" gan y rhaglen osod<br />
<b>Gwesteiwr:</b> wedi\'i osod i \"localhost\" gan y rhaglen osod<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> wedi\'i osod i\'r \"gwraidd\" gan y rhaglen osod<br />
<b>Cyfrinair:</b> cyfrinair eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> dewis i roi llythrennau o flaen pob enw tabl';
$string['databasecreationsettingshead'] = 'Nawr mae angen i chi ffurfweddu gosodiadau\'r gronfa ddata lle caiff y rhan fwyaf o ddata Moodle
ei storio. Caiff y gronfa ddata hon ei chreu\'n awtomatig gan y rhaglen osod â\'r gosodiadau a bennir isod.';
$string['databasecreationsettingssub'] = '<b>Math:</b> wedi\'i osod i \"mysql\" gan y rhaglen osod<br />
<b>Gwesteiwr:</b> wedi\'i osod i \"localhost\" gan y rhaglen osod<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> wedi\'i osod i\'r \"gwraidd\" gan y rhaglen osod<br />
<b>Cyfrinair:</b> cyfrinair eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> dewis i roi llythrennau o flaen pob enw tabl';
$string['databasesettings'] = 'Nawr mae angen i chi ffurfweddu\'r gronfa ddata lle caiff y rhan fwyaf o ddata Moodle
ei storio. Mae\'n rhaid bod y gronfa ddata hon wedi cael ei chreu a bod enw defnyddiwr a chyfrinair wedi\'u gosod i fynd i mewn iddi.<br />
<br /> <br />
<b>Math:</b> mysql neu postgres7<br />
<b>Gwesteiwr:</b> ee localhost neu db.isp.com<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> dewis i roi llythrennau o flaen pob enw tabl';
$string['databasesettingshead'] = 'Nawr mae angen i chi ffurfweddu\'r gronfa ddata lle caiff y rhan fwyaf o ddata Moodle
ei storio. Mae\'n rhaid bod y gronfa ddata hon wedi cael ei chreu a bod enw defnyddiwr a chyfrinair wedi\'u gosod i fynd i mewn iddi.';
$string['databasesettingssub'] = '<b>Math:</b> mysql neu postgres7<br />
<b>Gwesteiwr:</b> ee localhost neu db.isp.com<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> dewis i roi llythrennau o flaen pob enw tabl';
$string['databasesettingssub_mssql'] = '<b>Math:</b> SQL*Server (dim UTF-8) <b><font color=\"red\">Arbrawf! (nid ar gyfer ei ddefnyddio)</font></b><br />
<b>Gwesteiwr:</b> ee localhost neu db.isp.com<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> llythrennau blaen i\'w defnyddio ar gyfer pob enw tabl (gorfodol)';
$string['databasesettingssub_mssql_n'] = '<b>Math:</b> SQL*Server (wedi galluogi UTF-8)<br />
<b>Gwesteiwr:</b> ee localhost neu db.isp.com<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> llythrennau blaen i\'w defnyddio ar gyfer pob enw tabl (gorfodol)';
$string['databasesettingssub_mysql'] = '<b>Math:</b> MySQL<br />
<b>Gwesteiwr:</b> ee localhost neu db.isp.com<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddat<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> llythrennau blaen i\'w defnyddio ar gyfer pob enw tabl (dewisol)';
$string['databasesettingssub_oci8po'] = '<b>Math:</b> Oracle<br />
<b>Gwesteiwr:</b> heb ei ddefnyddio, rhaid ei adael yn wag<br />
<b>Enw:</b> yr enw a roddwyd i\'r cysylltiad tnsnames.ora<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> llythrennau blaen i\'w defnyddio ar gyfer pob enw tabl (gorfodol, dim mwy na 2cc.)';
$string['databasesettingssub_odbc_mssql'] = '<b>Math:</b> SQL*Server (dros ODBC) <b><font color=\"red\">Arbrawf! (nid ar gyfer ei ddefnyddio)</font></b><br />
<b>Gwesteiwr:</b> yr enw a roddwyd i\'r DSN yn y panel rheoli ODBC<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr ar gyfer eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> llythrennau blaen i\'w defnyddio ar gyfer pob enw tabl (gorfodol)';
$string['databasesettingssub_postgres7'] = '<b>Math:</b> PostgreSQL<br />
<b>Gwesteiwr:</b> ee localhost neu db.isp.com<br />
<b>Enw:</b> enw\'r gronfa ddata, ee moodle<br />
<b>Defnyddiwr:</b> enw defnyddiwr eich cronfa ddata<br />
<b>Cyfrinair:</b> cyfrinair ar gyfer eich cronfa ddata<br />
<b>Llythrennau Blaen Tablau:</b> llythrennau blaen i\'w defnyddio ar gyfer pob enw tabl (gorfodol)';
$string['dataroot'] = 'Cyfeiriadur Data';
$string['datarooterror'] = 'Heb lwyddo i ddod o hyd i\'r \'Cyfeiriadur Data\' a nodoch neu ni lwyddwyd i\'w greu. Gallwch naill ai gywiro\'r llwybr neu greu\'r cyfeiriadur hwn eich hun.';
$string['dbconnectionerror'] = 'Heb lwyddo i gysylltu â\'r gronfa ddata a nodoch. Tarwch olwg dros osodiadau eich cronfa ddata.';
$string['dbcreationerror'] = 'Gwall wrth greu cronfa ddata. Heb lwyddo i greu\'r gronfa ddata a enwyd â\'r gosodiadau a roddwyd.';
$string['dbhost'] = 'Gweinydd y Gwesteiwr';
$string['dbpass'] = 'Cyfrinair';
$string['dbprefix'] = 'Llythrennau Blaen Tablau';
$string['dbtype'] = 'Math';
$string['dbwrongencoding'] = 'Mae\'r gronfa ddata a ddewiswyd yn rhedeg dan un cod nad yw\'n cael ei argymell ($a).Byddai\'n well defnyddio un cronfa ddata wedi\'i hamgodio gydag Unicode (UTF-8) yn lle hynny. Gallwch hepgor y prawf hwn drwy ddewis \"Hepgor y Prawf Amgodio DB\" isod, ond mae\'n bosib y byddwch yn dod ar draws problemau yn y dyfodol.';
$string['dbwronghostserver'] = 'Rhaid i chi ddilyn rheolau\'r \"Gwesteiwr\" fel a eglurwyd uchod.';
$string['dbwrongnlslang'] = 'Rhaid i\'r newidyn amgylchedd NLS_LANG yn eich gweinydd gwe ddefnyddio\'r set nodau AL32UTF8. Darllenwch y dogfennau am PHP am sut i ffurfweddu OCI8 yn gywir.';
$string['dbwrongprefix'] = 'Rhaid i chi ddilyn rheolau \"Llythrennau Blaen Tablau\" fel a eglurwyd uchod';
$string['directorysettings'] = '<p>A wnewch chi gadarnhau lleoliadau\'r rhaglen Moodle hon.</p>
<p><b>Cyfeiriad ar y We:</b>
Rhowch y cyfeiriad ar y we llawn lle byddwch yn mynd i mewn i Moodle.
Os gellir defnyddio sawl URL i fynd i mewn i\'ch gwefan yna dewiswch
yr un fyddai\'ch myfyrwyr yn fwyaf tebygol o\'i ddefnyddio. Peidiwch â chynnwys
slaes ar y diwedd.</p>
<p><b>Cyfeiriadur Moodle:</b>
Rhowch y llwybr cyfeiriadur llawn i\'r rhaglen a osodwyd.
Gwnewch yn siŵr eich bod yn defnyddio\'r llythrennau bach/mawr cywir.</p>
<p><b>Cyfeiriadur Data:</b>
Mae Moodle angen lle ar gyfer cadw ffeiliau sy\'n cael eu llwytho i fyny. Dylai
defnyddiwr gweinydd y we (fel arfer \'neb\' neu \'apache\') allu darllen ac YSGRIFENNU ar y cyfeiriadur hwn, ond ni ddylid gallu mynd i mewn iddo\'n
uniongyrchol drwy\'r we.</p>';
$string['directorysettingshead'] = 'Cadarnhewch leoliadau\'r rhaglen Moodle hon';
$string['directorysettingssub'] = '<b>Cyfeiriad ar y We:</b>
Rhowch y cyfeiriad ar y we llawn lle byddwch yn mynd i mewn i Moodle.
Os gellir defnyddio sawl URL i fynd i mewn i\'ch gwefan yna dewiswch
yr un fyddai\'ch myfyrwyr yn fwyaf tebygol o\'i ddefnyddio. Peidiwch â chynnwys slaes ar y diwedd.
<br />
<br />
<b>Cyfeiriadur Moodle:</b>
Rhowch y llwybr cyfeiriadur llawn i\'r rhaglen a osodwyd
Gwnewch yn siŵr eich bod yn defnyddio\'r llythrennau bach/mawr cywir.
<br />
<br />
<b>Cyfeiriadur Data:</b>
Mae Moodle angen lle ar gyfer cadw ffeiliau sy\'n cael eu llwytho i fyny. Dylai
defnyddiwr gweinydd y we (fel arfer \'neb\' neu \'apache\') allu darllen ac YSGRIFENNU ar y cyfeiriadur hwn, ond ni ddylid gallu mynd i mewn iddo\'n
uniongyrchol drwy\'r we.';
$string['dirroot'] = 'Cyfeiriadur Moodle';
$string['dirrooterror'] = 'Yn ôl pob tebyg, mae gosodiadau \'Cyfeiriadur Moodle\' yn anghywir - nid ydym wedi gallu dod o hyd i raglen Moodle yn y fan honno. Mae\'r gwerth isod wedi cael ei ailosod.';
$string['download'] = 'Llwytho i lawr';
$string['downloadedfilecheckfailed'] = 'Heb lwyddo i wirio\'r ffeil a lwythwyd i lawr.';
$string['downloadlanguagebutton'] = 'Llwytho\'r pecyn iaith &quot;$a&quot;';
$string['downloadlanguagehead'] = 'Llwytho\'r pecyn iaith i lawr';
$string['downloadlanguagenotneeded'] = 'Gallwch barhau â\'r broses osod gan ddefnyddio\'r pecyn iaith diofyn, \"$a\".';
$string['downloadlanguagesub'] = 'Nawr, gallwch ddewis llwytho pecyn iaith i lawr a bwrw ymlaen â\'r broses osod yn yr iaith honno.<br /><br />Os nad ydych chi\'n gallu llwytho\'r pecyn iaith i lawr, bydd y broses osod yn cario ymlaen yn Saesneg. (Ar ôl i\'r broses osod ddod i ben, bydd gennych gyfle i lwytho a gosod pecynnau iaith ychwanegol.)';
$string['doyouagree'] = 'Ydych chi wedi darllen a deall yr amodau hyn?';
$string['environmenterrortodo'] = 'Rhaid datrys yr holl broblemau amgylcheddol (gwallau) uchod cyn parhau i osod y fersiwn hwn o Moodle!';
$string['environmenthead'] = 'Wrthi\'n profi eich amgylchedd ...';
$string['environmentrecommendcustomcheck'] = 'os yw\'r prawf hwn yn methu, mae\'n dangos problem bosibl';
$string['environmentrecommendinstall'] = 'wedi\'i argymell i\'w osod/ei alluogi';
$string['environmentrecommendversion'] = 'argymhellir fersiwn $a->needed ac rydych yn defnyddio $a->current';
$string['environmentrequirecustomcheck'] = 'rhaid i\'r prawf hwn basio';
$string['environmentrequireinstall'] = 'angen ei osod/ei alluogi.';
$string['environmentrequireversion'] = 'Mae angen fersiwn $a->needed ac rydych yn defnyddio $a->current';
$string['environmentsub'] = 'Rydym yn gwneud yn siŵr fod gwahanol gydrannu eich system yn bodloni gofynion y system';
$string['environmentxmlerror'] = 'Gwall wrth ddarllen data amgylchedd ($a->error_code)';
$string['error'] = 'Gwall';
$string['fail'] = 'Methu';
$string['fileuploads'] = 'Llwytho ffeiliau i fyny';
$string['fileuploadserror'] = 'Dylai hwn fod ymlaen';
$string['fileuploadshelp'] = '<p>Yn ôl pob golwg, nid yw eich gweinydd wedi galluogi llwytho ffeiliau i fyny.</p>
<p>Byddwch dal yn gallu gosod Moodle, ond os nad ydych yn gallu gwneud hyn, ni fyddwch yn gallu
llwytho ffeiliau cyrsiau na delweddau proffil defnyddwyr i fyny.</p>
<p>I alluogi llwytho ffeiliau i fyny, bydd angen i chi (neu weinyddwr eich system)
olygu\'r brif ffeil php.ini ar eich system a newid y gosodiad ar gyfer
<b>file_uploads</b> to \'1\'.</p>';
$string['gdversion'] = 'Fersiwn GD';
$string['gdversionerror'] = 'Dylai\'r llyfrgell GD fod ar gael i brosesu a chreu delweddau';
$string['gdversionhelp'] = '<p>Yn ôl pob golwg, nid oes GD wedi\'i osod ar eich gweinydd.</p>
<p>Llyfrgell yw GD sydd ei hangen ar PHP i adael Moodle i brosesu delweddau
(megis yr eiconau proffil defnyddwyr) ac i greu delweddau newydd (megis
y graffiau log). Bydd Moodle dal yn gweithio heb GD - ond ni fydd y nodweddion hyn ar gael i chi.</p>
<p>I ychwanegu GD at PHP dan Unix, crynhowch PHP gan ddefnyddio\'r paramedr --with-gd.</p>
<p>fel arfer, gallwch olygu php.ini yn Windows drwy dynnu\'r ddwy slaes o flaen y llinell php_gd2.dll.</p>';
$string['globalsquotes'] = 'Gafael Anniogel o Ddyfynodau\'r Safle Cyfan';
$string['globalsquoteserror'] = 'Trwsio eich gosodiadau PHP: analluogi register_globals a/neu galluogi magic_quotes_gpc';
$string['globalsquoteshelp'] = '<p>Nid ydym yn argymell analluogi Dyfynodau Hud GPC a galluogi Cofrestru Dyfynodau Safle Cyfan ar yr un pryd.</p>
<p>Dyma\'r gosodiad sy\'n cael ei argymell <b>magic_quotes_gpc = Ymlaen</b> a <b>register_globals = Diffodd</b> yn eich ffeil php.ini</p>
<p>Os nad ydych yn gallu mynd i mewn i\'ch php.ini, efallai gallwch roi\'r llinell ganlynol mewn ffeil .htaccess yn eich cyfeiriadur Moodle:
<blockquote>php_value magic_quotes_gpc On</blockquote>
<blockquote>php_value register_globals Off</blockquote>
</p>';
$string['help'] = 'Help';
$string['iconvrecommended'] = 'Argymhellir yn gryf eich bod yn gosod y llyfrgell ICONV ddewisol er mwyn gwella perfformiad y safle, yn enwedig os gall eich safle ddelio ag ieithoedd heblaw rhai Lladin.';
$string['info'] = 'Gwybodaeth';
$string['installation'] = 'Gosod';
$string['invalidemail'] = 'Cyfeiriad e-bost annilys';
$string['invalidmd5'] = 'md5 annilys';
$string['langdownloaderror'] = 'Yn anffodus, ni osodwyd yr iaith ganlynol: \"$a\". Bydd y broses osod yn cario ymlaen yn Saesneg.';
$string['langdownloadok'] = 'Wedi gosod \"$a\" yn llwyddiannus. Bydd y broses osod yn cario ymlaen yn yr iaith hon.';
$string['language'] = 'Iaith';
$string['magicquotesruntime'] = 'Amser Rhedeg Dyfynodau Hud';
$string['magicquotesruntimeerror'] = 'Dylai hwn fod wedi\'i ddiffodd';
$string['magicquotesruntimehelp'] = '<p>Dylid diffodd Amser Rhedeg Dyfynodau Hud fel bo Moodle yn gweithio\'n iawn.</p>
<p>Fel arfer, mae wedi\'i ddiffodd yn ddiofyn ... tarwch olwg ar y gosodiad <b>magic_quotes_runtime</b> yn eich ffeil php.ini.</p>
<p><p>Os nad ydych yn gallu mynd i mewn i\'ch php.ini, efallai gallwch roi\'r llinell ganlynol mewn ffeil .htaccess yn eich cyfeiriadur Moodle:
<blockquote>php_value magic_quotes_runtime Off</blockquote>
</p>';
$string['mbstringrecommended'] = 'Argymhellir yn gryf eich bod yn gosod y llyfrgell MBSTRING ddewisol er mwyn gwella perfformiad y safle, yn enwedig os gall eich safle ddelio ag ieithoedd heblaw rhai Lladin.';
$string['memorylimit'] = 'Maint y Cof';
$string['memorylimiterror'] = 'Mae maint y cof PHP wedi\'i osod yn eitaf isel ...efallai y cewch broblemau yn nes ymlaen.';
$string['memorylimithelp'] = '<p>Mae maint y cof PHP yn eich gweinydd ar hyn o bryd yn $a.</p>
<p>Gall hyn arwain at broblemau â\'r cof yn nes ymlaen, yn enwedig
os ydych wedi galluogi llawer o fodiwlau a/neu lawer o ddefnyddwyr.</p>
<p>Rydym yn argymell eich bod yn ffurfweddu PHP gyda mwy o gof os yn bosib, megis 40M.
Mae sawl ffordd o wneud hyn:</p>
<ol>
<li>Os ydych yn gallu, ceisiwch ail-grynhoi PHP gyda <i>--enable-memory-limit</i>.
Bydd hyn yn gadael i Moodle osod maint y cof ei hun.</li>
<li>Os ydych yn gallu mynd i mewn i\'ch ffeil php.ini, gallwch newid y gosodiad <b>memory_limit</b>
yn y fan honno i tua 40M. Os nad ydych chi\'n gallu gwneud hyn eich hun, efallai
y gallech ofyn i\'ch gweinyddwr wneud hyn i chi.</li>
<li>Ar rai gweinyddion PHP, gallwch greu ffeil .htaccess yng nghyfeiriadur Moodle
sy\'n cynnwys y llinell hon:
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Fodd bynnag, ar rai gweinyddion bydd hyn yn atal <b>pob</b> tudalen PHP rhag gweithio
(bydd gwallau\'n ymddangos pan fyddwch yn edrych ar dudalennau) felly bydd rhaid i chi dynnu\'r ffeil .htaccess file.</p></li>
</ol>';
$string['missingrequiredfield'] = 'Mae maes gofynnol ar goll';
$string['moodledocslink'] = 'Dogfennau Moodle ar gyfer y dudalen hon';
$string['mssql'] = 'SQL*Server (mssql)';
$string['mssql_n'] = 'SQL*Server gyda chefnogaeth UTF-8t (mssql_n)';
$string['mssqlextensionisnotpresentinphp'] = 'Nid yw\'r PHP wedi cael ei ffurfweddu\'n iawn gyda\'r estyniad MSSQL er mwyn iddo allu cyfathrebu â SQL*Server. Tarwch olwg dros eich ffeil php.ini neu ail-grynhoi PHP.';
$string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Fodd bynnag, os yw eich safle\'n defnyddio ieithoedd iso-8859-1 (Lladin) YN UNIG, gallwch barhau i ddefnyddio\'r MySQL 4.1.12 (neu uwch) sydd wedi\'i osod gennych ar hyn o bryd.';
$string['mysql416required'] = 'MySQL 4.1.16 yw\'r fersiwn sylfaenol sy\'n ofynnol ar gyfer Moodle 1.6 er mwyn sicrhau y gellir trosi\'r holl ddata i UTF-8 yn y dyfodol.';
$string['mysqlextensionisnotpresentinphp'] = 'Nid yw\'r PHP wedi cael ei ffurfweddu\'n iawn gyda\'r estyniad MSSQL er mwyn iddo allu cyfathrebu â MySQL. Tarwch olwg dros eich ffeil php.ini neu ail-grynhoi PHP.';
$string['name'] = 'Enw';
$string['next'] = 'Nesaf';
$string['oci8po'] = 'Oracle (oci8po)';
$string['ociextensionisnotpresentinphp'] = 'Nid yw\'r PHP wedi cael ei ffurfweddu\'n iawn gyda\'r estyniad OCI8 er mwyn iddo allu cyfathrebu ag Oracle. Tarwch olwg dros eich ffeil php.ini neu ail-grynhoi PHP.';
$string['odbc_mssql'] = 'SQL*Server over ODBC (odbc_mssql)';
$string['odbcextensionisnotpresentinphp'] = 'Nid yw\'r PHP wedi cael ei ffurfweddu\'n iawn gyda\'r estyniad ODBC er mwyn iddo allu cyfathrebu â SQL*Server. Tarwch olwg dros eich ffeil php.ini neu ail-grynhoi PHP.';
$string['ok'] = 'IAWN';
$string['opensslrecommended'] = 'Argymhellir yn gryf eich bod yn gosod y llyfrgell OpenSSL ddewisol -- mae\'n galluogi Rhwydweithio Moodle.';
$string['pass'] = 'Pasio';
$string['password'] = 'Cyfrinair';
$string['pgsqlextensionisnotpresentinphp'] = 'Nid yw\'r PHP wedi cael ei ffurfweddu\'n iawn gyda\'r estyniad PGSQL er mwyn iddo allu cyfathrebu â PostgreSQL. Tarwch olwg dros eich ffeil php.ini neu ail-grynhoi PHP.';
$string['php50restricted'] = 'Mae PHP 5.0.x yn frith o broblemau hysbys; uwchraddiwch i 5.1.x neu israddiwch i 4.3.x neu 4.4.x';
$string['phpversion'] = 'Fersiwn PHP';
$string['phpversionerror'] = 'Mae\'n rhaid i\'r fersiwn PHP fod yn o leiaf 4.3.0 neu 5.1.0 (mae llawer o broblemau gyda 5.0.x).';
$string['phpversionhelp'] = '<p>Mae angen o leiaf fersiwn PHP 4.3.0 neu 5.1.0 ar Moodle (mae llawer o broblemau gyda 5.0.x).</p>
<p>Ar hyn o bryd, rydych yn rhedeg fersiwn $a</p>
<p>Rhaid i chi uwchraddio PHP neu newid i westeiwr â fersiwn diweddarach o PHP!<br/>
(Os oes gennych 5.0.x gallwch hefyd is-raddio i fersiwn 4.4.x)</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Blaenorol';
$string['releasenoteslink'] = 'I gael gwybodaeth am y fersiwn hwn o Moodle, gweler y <a target=\"_new\" href=\"$a\">Nodiadau Rhyddhau</a> ar-lein';
$string['remotedownloadnotallowed'] = 'Ni chaniateir llwytho cydrannau i lawr i\'ch gweinydd (mae allow_url_fopen wedi\'i analluogi).<br /><br />Rhaid i chi lwytho\'r ffeil <a href=\"$a->url\">$a->url</a> i lawr eich hun, ei chopïo i \"$a->dest\" yn eich gweinydd, a\'i dadzipio yno.';
$string['report'] = 'Adroddiad';
$string['restricted'] = 'Wedi\'i wahardd';
$string['safemode'] = 'Modd Diogel';
$string['safemodeerror'] = 'Mae\'n bosibl y bydd Moodle yn profi problemau os yw\'r modd diogel ymlaen';
$string['safemodehelp'] = '<p>Mae\'n bosibl y bydd Moodle yn profi llawer o broblemau os yw\'r modd diogel ymlaen. Un broblem y gallech ddod ar ei thraws yw
na fyddwch o bosib yn gallu creu ffeiliau newydd.</p>
<p>Fel arfer, dim ond gwesteiwyr gwe cyhoeddus paranoid sy\'n troi\'r modd diogel ymlaen, felly efallai y
bydd rhaid i chi gael cwmni gwesteiwr gwe newydd ar gyfer eich safle Moodle.</p>
<p>Gallwch roi cynnig ar fwrw ymlaen i osod, ond mae\'n siŵr y byddwch yn dod ar draws rhai problemau yn nes ymlaen.</p>';
$string['serverchecks'] = 'Archwiliadau Gweinydd';
$string['sessionautostart'] = 'Awto Gychwyn y Sesiwn';
$string['sessionautostarterror'] = 'Dylai hwn fod wedi\'i ddiffodd';
$string['sessionautostarthelp'] = '<p>Mae angen cefnogaeth sesiwn ar Moodle ac ni fydd yn gweithio hebddo.</p>
<p>Gallwch alluogi sesiynau yn y ffeil php.ini file ... chwiliwch am y paramedr session.auto_start.</p>';
$string['skipdbencodingtest'] = 'Hepgor Prawf Amgodio DB';
$string['status'] = 'Statws';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Cymraeg';
$string['unicoderecommended'] = 'Argymhellir storio eich holl ddata yn Unicode (UTF-8). Dylid gosod fersiynau newydd mewn cronfeydd data sydd ag Unicode fel set nodau ddiofyn. Os ydych chi\'n uwchraddio, dylech gyflawni\'r broses mudo UTF-8 (gweler y dudalen Gweinyddwyr).';
$string['unicoderequired'] = 'Mae\'n ofynnol eich bod yn storio eich holl ddata ar fformat Unicode (UTF-8). Rhaid gosod fersiynau newydd mewn cronfeydd data sydd ag Unicode fel set nodau ddiofyn. Os ydych chi\'n uwchraddio, dylech gyflawni\'r broses mudo UTF-8 (gweler y dudalen Gweinyddwyr).';
$string['user'] = 'Defnyddiwr';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = 'Rydych chi\'n gweld y dudalen hon gan eich bod wedi gosod a
lansio\'r pecyn <strong>$a->packname $a->packversion</strong> yn llwyddiannus ar eich cyfrifiadur. Llongyfarchiadau!';
$string['welcomep30'] = 'Mae\'r fersiwn <strong>$a->installername</strong> yn cynnwys rhaglenni
i greu amgylchedd y gall <strong>Moodle</strong> weithio ynddo, sef:';
$string['welcomep40'] = 'Mae\'r pecyn hefyd yn cynnwys <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'Y trwyddedau perthnasol sy\'n llywodraethu dros yr holl raglenni yn y pecyn hwn. Y pecyn cyflawn yw <strong>$a->installername</strong>
<a href=\"http://www.opensource.org/docs/definition_plain.html\">open source</a> a chaiff ei ddosbarthu dan y drwydded <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>.';
$string['welcomep60'] = 'Bydd y tudalennau canlynol yn eich arwain drwy\'r camau syml i
ffurfweddu a gosod <strong>Moodle</strong> ar eich cyfrifiadur. Gallwch ddewis derbyn y gosodiadau
diofyn, neu gallwch eu newid eich hun ar gyfer eich dibenion chi.';
$string['welcomep70'] = 'Cliciwch y botwm \"Nesaf\" i fwrw ymlaen i osod <strong>Moodle</strong>.';
$string['wrongdestpath'] = 'Llwybr cyrchfan anghywir.';
$string['wrongsourcebase'] = 'Bôn URL ffynhonnell anghywir.';
$string['wrongzipfilename'] = 'Enw ffeil ZIP anghywir.';
$string['wwwroot'] = 'Cyfeiriad ar y we';
$string['wwwrooterror'] = 'Nid yw\'r \'Cyfeiriad ar y We\' yn ddilys - yn ôl pob tebyg, nid yw\'r rhaglen Moodle yn y cyfeiriad hwn. Mae\'r gwerth isod wedi cael ei ailosod.';
?>
+47
View File
@@ -0,0 +1,47 @@
<?php
/// Please, do not edit this file manually! It's auto generated from
/// contents stored in your standard lang pack files:
/// (langconfig.php, install.php, moodle.php, admin.php and error.php)
///
/// If you find some missing string in Moodle installation, please,
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
$string['caution'] = 'Oprez';
$string['closewindow'] = 'Zatvorite ovaj prozor';
$string['configfilenotwritten'] = 'Instalacijska skripta nije bila u mogućnosti automatski kreirati datoteku naziva config.php koja bi sadržavala vaše odabrane postavke, vjerojatno zbog toga što nema prava na pisanje (mijenjanje sadržaja) u vašoj Moodle mapi. Ako zo želite, možete ručno kopirati kod u datoteku config.php u osnovnoj mapi vaše Moodle instalacije.';
$string['configfilewritten'] = 'config.php je uspješno kreiran';
$string['continue'] = 'Nastavi';
$string['database'] = 'Baza podataka';
$string['dataroot'] = 'Mapa s podacima';
$string['dbconnectionerror'] = 'Nemoguće je uspostaviti vezu sa bazom podataka koju ste naveli. Molimo provjerite podatke koje ste unijeli.';
$string['dbcreationerror'] = 'Pogreška pri kreiranju baze podataka. Nije bilo moguće kreirati bazu navedenog imena uz zadane postavke';
$string['dbhost'] = 'Poslužitelj';
$string['dbprefix'] = 'Prefiks tablice';
$string['dbtype'] = 'Tip';
$string['dirroot'] = 'Moodle mapa';
$string['error'] = 'Greška';
$string['fileuploadserror'] = 'Ova opcija bi trebala biti uključena';
$string['gdversion'] = 'GD inačica';
$string['help'] = 'Pomoć';
$string['info'] = 'Informacija';
$string['installation'] = 'Instalacija';
$string['language'] = 'Jezik';
$string['magicquotesruntime'] = 'Magic Quotes Run Time';
$string['magicquotesruntimeerror'] = 'Ova opcija bi trebala biti isključena';
$string['name'] = 'Ime';
$string['next'] = 'Sljedeći';
$string['ok'] = 'U redu';
$string['pass'] = 'Pass';
$string['password'] = 'Lozinka';
$string['phpversion'] = 'PHP inačica';
$string['phpversionerror'] = 'PHP inačica mora biti bar 4.1.0';
$string['previous'] = 'Prethodni';
$string['sessionautostarterror'] = 'Ova opcija bi trebala biti isključena';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'Hrvatski';
$string['user'] = 'Korisnik';
?>
+29
View File
@@ -0,0 +1,29 @@
<?php
/// Please, do not edit this file manually! It's auto generated from
/// contents stored in your standard lang pack files:
/// (langconfig.php, install.php, moodle.php, admin.php and error.php)
///
/// If you find some missing string in Moodle installation, please,
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in stringnames.txt (same dir)
$string['closewindow'] = 'Փակեք պատուհանը';
$string['continue'] = 'Շարունակել';
$string['error'] = 'Սխալ';
$string['help'] = 'Օգնություն';
$string['info'] = 'Տեղեկատվություն';
$string['language'] = 'Լեղու';
$string['name'] = 'Անվանում';
$string['next'] = 'Հաջորդը';
$string['ok'] = 'OK';
$string['password'] = 'Նշանաբառ';
$string['previous'] = 'Նախորդ';
$string['report'] = 'Հաշվետվություն';
$string['status'] = 'Կարգավիճակ';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Հայերեն';
$string['user'] = 'Օգտագործող';
?>
+23 -2
View File
@@ -40,6 +40,12 @@ $string['databasecreationsettingshead'] = 'Īnāianei me whirihora e koe ngā ta
$string['databasecreationsettingssub'] = '<b>Momo:</b> He mea whakapūmau ki \"mysql\" e te pūtāuta<br /><b>Kaihautū:</b> He mea whakapūmau ki \"localhost\" e te pūtāuta<br /><b>Ingoa:</b> ingoa pātengi raraunga, arā, moodle<br /><b>Kaiwhakamahi:</b> He mea whakapūmau ki \"root\" e te pūtāuta<br /><b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua kōwhiri mō ngā ingoa ripanga katoa';
$string['databasesettingshead'] = 'Īnāianei me whirihora e koe ngā tautuhinga pātengi raraunga ki te wāhi penapena i te nuinga o ngā raraunga Moodle. Ko te tikanga, kua oti kē tēnei pātengi raraunga, te ingoa kaiwhakamahi, me te kupuhipa te waihanga kia āhei ai ki te uru atu.';
$string['databasesettingssub'] = '<<b>Momo:</b> mysql, postgres7 rānei<br /><b>Kaihautū:</b> arā localhost, db.isp.com rānei<br /><b>Ingoa:</b> ingoa pātengi raraunga, pēnei ake i a moodle<br /><b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /><b>Kupuhipa:</b> tō kupuhip pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua kōwhiri mō ngā ingoa ripanga katoa';
$string['databasesettingssub_mssql'] = '<b>Momo:</b> SQL*Server (non UTF-8) <b><font color=\"red\">Hei whakamātau! (kaua e whakamahia kia ngao)</font></b><br /><br /> <b>Kaihautū:</b> arā localhost, db.isp.com rānei<br /> <b>Ingoa:</b> ingoa pātengi raraunga, pēnei ake i a moodle<br /><b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /> <b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua hei whakamahi ki ngā ingoa ripanga katoa (whakahauanga)';
$string['databasesettingssub_mssql_n'] = '<b>Momo:</b> SQL*Server (UTF-8 enabled) <br /> <b>Kaihautū:</b> arā localhost, db.isp.com rānei<br /> <b>Ingoa:</b> ingoa pātengi raraunga, pēnei ake i a moodle<br /><b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /> <b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua hei whakamahi ki ngā ingoa ripanga katoa (whakahauanga)';
$string['databasesettingssub_mysql'] = '<b>Momo:</b> MySQL <br /> <b>Kaihautū:</b> arā localhost, db.isp.com rānei<br /> <b>Ingoa:</b> ingoa pātengi raraunga, pēnei ake i a moodle<br /><b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /> <b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua hei whakamahi ki ngā ingoa ripanga katoa (kōwhiringa)';
$string['databasesettingssub_oci8po'] = '<b>Momo:</b> Oracle <br /><b>Kaihautū:</b> kāore i te whakamahia, waihotia kia wātea<br /> <b>Ingoa:</b> given name of the tnsnames.ora connection<br/><b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /> <b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b>kuhimua hei whakamahi ki ngā ingoa ripanga katoa (whakahauanga, 2cc max)';
$string['databasesettingssub_odbc_mssql'] = '<b>Momo:</b> SQL*Server (over ODBC) <b><font color=\"red\">Hei whakamātau. (kaua e whakamahia kia ngao)</font></b><br /> <b>Kaihautū:</b> given name of the DSN in the ODBC control panel<br /> <b>Ingoa:</b> ingoa pātengi raraunga, pēnei ake i a moodle<br /> <b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /> <b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua hei whakamahi ki ngā ingoa ripanga katoa (whakahauanga)';
$string['databasesettingssub_postgres7'] = '<b>Momo:</b> PostgreSQL<br /><b>Kaihautū:</b> arā localhost, db.isp.com rānei<br /> <b>Ingoa:</b> ingoa pātengi raraunga, pēnei ake i a moodle<br /><b>Kaiwhakamahi:</b> tō ingoa kaiwhakamahi pātengi raraunga<br /> <b>Kupuhipa:</b> tō kupuhipa pātengi raraunga<br /><b>Kuhimua o Ngā Ripanga:</b> kuhimua hei whakamahi ki ngā ingoa ripanga katoa (whakahauanga)';
$string['dataroot'] = 'Whaiaronga Raraunga';
$string['datarooterror'] = 'Kāore te \'Whaiaronga Raraunga\' i whakapūtāhia e koe i kitea, i taea rānei te waihanga. Whakatikahia te ara, waihanga ā-ringa rānei i te whaiaronga.';
$string['dbconnectionerror'] = 'Kāore i taea te tūhono ki te pātengi raraunga i whakapūtāhia. Takina ō tautuhinga pātengi raraunga.';
@@ -48,6 +54,9 @@ $string['dbhost'] = 'Tūmau Kaihautū';
$string['dbprefix'] = 'Kuhimua o Ngā Ripanga';
$string['dbtype'] = 'Momo';
$string['dbwrongencoding'] = 'E haere ana te pātengi raraunga i tīpakohia ki raro i tētahi whakawaehere tūtohu-kore ($a). He pai ake te whakamahi kē i tētahi pātengi raraunga waehereao (UTF-8). Heoi, mā te tīpako i te pouaka taki \'Tīpoka Whakamātautau Whakawaehere DB\' o raro nei e taea ai te tīpoka atu i te whakamātautau nei, engari tērā pea ka pā mai he raru ā te wā e heke mai nei';
$string['dbwronghostserver'] = 'Me whai koe i ngā ture \"hautū\" kua whakamāramahia ki runga';
$string['dbwrongnlslang'] = 'Me whakamahi te variable taiao NLS_LANG i roto i tō tūmau tukutuku i te pūāhua AL32UTF8. Tirohia te tuhinga PHP kia kite me pehea te whirihora tika i te OCI8.';
$string['dbwrongprefix'] = 'Me whai koe i ngā ture \"Tables Prefix\" kua whakamāramahia ki runga.';
$string['directorysettingshead'] = 'Tēnā koa, whakaūngia ngā tauwāhi o tēnei tāutanga o Moodle.';
$string['directorysettingssub'] = '<b>Wāhitau Tukutuku:</b>Whakapūtāhia te wāhitau tukutuku o Moodle. Mēnā he maha ngā URL, kōwhirihia te mea ngāwari ki ō ākonga. Kaua e tāpiri i te rītaha whaimuri. <br > <br /> <b>Whaiaronga o Moodle:</b>Whakapūtāhia te ara whaiaronga katoa ki tēnei tāutanga. Kia tika hoki ngā pūmatua/iti. <br /> <br /> <b>Whaiaronga Raraunga:</b>Me whiwhi wāhi kia taea e Moodle ngā kōnae kua tikina ake te tiaki. Me taea tēnei whaiaronga e te kaiwhakamahi tūmau tukutuku (i te nuinga o te wā ko \'nobody\', \'apache\' rānei) te pānui me te TUHI HOKI, engari kia kaua e uru tika tonu mā te tukutuku.</p>';
$string['dirroot'] = 'Whaiaronga Moodle';
@@ -91,19 +100,29 @@ $string['memorylimiterror'] = 'Kua whakatautuhia kia iti noa te tepe pūmahara o
$string['memorylimithelp'] = '<p>I tēnei wā ko te tepe pūmahara PHP mō tō tūmau ko te $a.</p><p>Mā tēnei pea ka raru ai te pūmahara o Moodle, inā ki te maha ake ngā kōwae e hohe ana, ngā kaiwhakamahi hoki/rānei.</p> <p>Ko tāku ki a koe, me whirihora te PHP ki te tepe teitei ake mēnā e taea ana, pēnei ake i te 16M. Arā atu ngā huarahi hei whakatutuki i tēnei:</p><ol><li>Mēnā ka taea, whakahiato anōtia te PHP ki te <i>--enable-memory-limit</i>. Mā tēnei ka taea e Moodle te tepe pūmahara te whakarite.</li><li>Mēnā he āheitanga tāu ki tō kōnae php.ini, ka taea te tautuhinga <b>memory_limit</b> te huri kia āhua 16M. Ki te kore ō āheitanga, pātaihia tō kaiwhakahaere, māna tērā āheitanga e hoatu ki a koe.</li><li>I runga i ētahi tūmau PHP ka taea te waihanga kōnae .htaccess ki roto i te whaiaronga Moodle e pupuru ana i tēnei rārangi: <p><blockquote>php_value memory_limit 16M</blockquote></p> <p>Heoi, i runga i ētahi tūmau ka kaupare pea te mahinga o ngā whārangi PHP <b>katoa</b> (ka kitea ngā hapa inā tirohia ngā whārangi) nō reira, me tango te kōnae .htaccess.</p></li></ol>';
$string['missingrequiredfield'] = 'E ngaro ana tētahi āpure e hiahiatia ana';
$string['moodledocslink'] = 'Tuhinga Moodle mō tēnei whārangi';
$string['mssql'] = 'SQL*Server (mssql)';
$string['mssql_n'] = 'SQL*Server with UTF-8 support (mssql_n)';
$string['mssqlextensionisnotpresentinphp'] = 'Kāore i tika te whirihora i te PHP ki te toronga MSSQL kia taea te whiti ki te SQL*Server. Please check your php.ini file or recompile PHP.';
$string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Engari, ka taea e koe tō MySQL 4.1.12 (pai ake rānei) te whakamahi tonu mēnā kei te whakamahi tō pae i ngā reo (rātini) iso-8859-1 ANAKE.';
$string['mysql416required'] = 'Me whiwhi putanga MySQL 4.1.16 kia āhei ai ngā raraunga katoa te whakatahuri ki UTF-8 ā muri ake nei.';
$string['mysqlextensionisnotpresentinphp'] = 'Kāore i tika te whirihoratanga o te PHP me te toronga MySQL kia taea te whakawhiti me te MySQL. Taki koe i tō kōnae php.ini, whakahiato anō rānei i te PHP.';
$string['name'] = 'Ingoa';
$string['next'] = 'Panuku';
$string['oci8po'] = 'Oracle (oci8po)';
$string['ociextensionisnotpresentinphp'] = 'Kāore i tika te whirihora o PHP me te toronga OCI8 kia taea te whakawhiti me Oracle. Taki koa i tō kōnae php.ini whakahiato anō rānei i PHP.';
$string['odbc_mssql'] = 'SQL*Server over ODBC (odbc_mssql)';
$string['odbcextensionisnotpresentinphp'] = 'Kāore i tika te whirihora o PHP me te toronga OCI8 kia taea te whakawhiti me te tūmau SQL*. Taki koa i tō kōnae php.ini whakahiato anō rānei i PHP.';
$string['ok'] = 'ĀE';
$string['parentlanguage'] = '<< Ngā Kaiwhakamāori: Ki te whai Reo Matua, e tika ana kia whakamahia e Moodle ki te ngaro ētahi rārangi mai i tō pōkai reo, tō reo, tena whakapūtā te waehere ki konei. Ki te waiho kia wātea ka whakamahia te Pākehā. Hei tauira: nl >>';
$string['pass'] = 'Pāhi';
$string['pass'] = 'Hipa';
$string['password'] = 'Kupuhipa';
$string['pgsqlextensionisnotpresentinphp'] = 'Kāore i tika te whirihora o PHP me te toronga PGSQL kia taea te whakawhiti me te PostgreSQL. Taki koa i tō kōnae php.ini whakahiato anō rānei i PHP.';
$string['php50restricted'] = 'He maha ngā raruraru e mōhiotia nei tō te PHP 5.0.x, whakapaingia aketia koa ki 5.1.x, e hoki rānei koa ki 4.3.x, 4.4.x rānei';
$string['phpversion'] = 'Putanga PHP';
$string['phpversionerror'] = 'Kia 4.1.0 neke atu ranei te putanga PHP';
$string['phpversionhelp'] = '<p>E hiahiatia ana e Moodle kia 4.1.0 neke atu rānei te putanga PHP.</p><p>I tēnei wā kei te whakahaere koe i te putanga $a</p><p>Me whakahōu te PHP, nuku rānei ki tētahi kaihautū me te putanga hōu PHP hōu ake!</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Tōmua';
$string['remotedownloadnotallowed'] = 'Kāore e taea ngā wae o tō tūmau te tikiake (kua monokia te allow_url_fopen). <br /><br />Me tikiake-ā-ringa te kōnae <a href=\"$a->url\">$a->url</a>, tāruatia ki \"$a->dest\", ā, whewherahia i reira';
$string['report'] = 'Pūrongo';
@@ -115,7 +134,9 @@ $string['sessionautostarterror'] = 'Ko te tikanga kua weto tēnei';
$string['skipdbencodingtest'] = 'Tīpokatia te Whakamātautau Whakamuna DB';
$string['status'] = 'Tūnga';
$string['thischarset'] = 'utf-8';
$string['thislanguage'] = 'Māori - WWoW';
$string['thislanguage'] = 'Māori - Waikato';
$string['unicoderecommended'] = 'E tūtohitia ana te penapena i ō raraunga katoa hei Unicode (UTF-8). Ko te tikanga me mahi i ngā tāutatanga hōu ki ngā pātengi raraunga ko te pūāhua taunoa he Unicode. Mēnā e whakahōu ana koe, me mahi i te tuka heke UTF8 (tirohia te whārangi Whakahaere).';
$string['unicoderequired'] = 'E hiahiatia ana kia penapena koe i ō raraunga katoa ki te hōputu Unicode (UTF-8). Ko te tikanga me mahi i ngā tāutatanga hōu ki ngā pātengi raraunga ko te pūāhua taunoa he Unicode. Mēnā e whakahōu ana koe, me mahi i te tuka heke UTF8 (tirohia te whārangi Whakahaere).';
$string['user'] = 'Kaiwhakamahi';
$string['welcomep10'] = '$a->ingoapūtāuta ($a->putangapūtāuta)';
$string['welcomep20'] = 'Ka taea e koe te kite i tēnei whārangi nātemea kua tāuta tika, whakarewa tika hoki koe i te pōkai <strong>$a->ingoapōkai $a->putangapōkai</strong> i tō rorohiko. Ngā mihi!';
+228
View File
@@ -0,0 +1,228 @@
<?php
/// Please, do not edit this file manually! It's auto generated from
/// contents stored in your standard lang pack files:
/// (langconfig.php, install.php, moodle.php, admin.php and error.php)
///
/// If you find some missing string in Moodle installation, please,
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Админ директор буруу заагдсан байна';
$string['admindirname'] = 'Админ директор';
$string['admindirsettinghead'] = 'Админ директорыг тохируулах нь';
$string['admindirsettingsub'] = 'Маш цөөхөн вэбхостууд /админыг хяналтын тохируулга болон бусад зүйлд хандахын тулд тусгай хаяг мэтээр ашигладаг. Харамсалтай нь Моодлийн админ хуудасны стандарт байрлалтай зөрчилддөг. Та үүнийг суулгах үедээ админ директорын нэрийг нь өөрчилснөөр засаж болох бөгөөд тэр шинэ нэрээ энд өгнө. Жишээ нь: <br /> <br /><b>moodleadmin</b><br /> <br />
Энэ нь Моодл дээрх админ холбоосуудыг засах болно.';
$string['bypassed'] = 'Дамжуулсан';
$string['cannotcreatelangdir'] = 'lang хавтсыг үүсгэх боломжгүй.';
$string['cannotcreatetempdir'] = 'temp директор үүсгэж чадахгүй байна';
$string['cannotdownloadcomponents'] = 'Компонент татаж чадахгүй байна.';
$string['cannotdownloadzipfile'] = 'Zip файл татаж чадахгүй байна';
$string['cannotfindcomponent'] = 'Компонент олж чадахгүй байна';
$string['cannotsavemd5file'] = 'md5 файл хадгалж чадахгүй байна.';
$string['cannotsavezipfile'] = 'Zip файл хадгалж чадахгүй байна.';
$string['cannotunzipfile'] = 'Файл unzip хийж чадахгүй байна.';
$string['caution'] = 'Анхааруулга';
$string['check'] = 'Шалгах';
$string['chooselanguagehead'] = 'Хэлээ сонго';
$string['chooselanguagesub'] = 'Зөвхөн суулгах үед ашиглагдах хэлээ сонго. Та дараа нь сайтны болон хэрэглэгчийн хэлийг сонгож болно.';
$string['closewindow'] = 'Энэ цонхыг хаах';
$string['compatibilitysettingshead'] = 'Таны РНР тохиргоог шалгаж байна...';
$string['compatibilitysettingssub'] = 'Таны сервер Моодлыг зөв ажиллуулахын тулд бүх тестийг давах ёстой';
$string['componentisuptodate'] = 'Компонент сүүлийн хувилбар байна.';
$string['configfilenotwritten'] = 'Суулгах код нь автоматаар, таны сонгосон тохиргоонуудыг агуулсан config.php файл үүсгэж чадсангүй. Магадгүй Моодл хавтас тань бичигдэх эрхгүй байх. Та доорх кодыг Моодлын эх хавтсан дах config.php файл руу өөрөө хуулж болно.';
$string['configfilewritten'] = 'config.php файл амжилттай үүслээ';
$string['configurationcompletehead'] = 'Тохируулга дууслаа';
$string['configurationcompletesub'] = 'Моодл таны суулгаж буй эх хавтсан дах файлд тохируулгыг тань хадгалах оролдлого хийлээ.';
$string['continue'] = 'Үргэлжлүүлэх';
$string['database'] = 'Өгөгдлийн сан';
$string['databasecreationsettingshead'] = 'Одоо та ихэнх Моодлын өгөгдөл хадгалагдах өгөгдийн сангийн тохиргоог хийх хэрэгтэй. Энэ өгөгдлийн сан нь доор тодорхойлогдсоноор автоматаар үүсэх болно.';
$string['databasecreationsettingssub'] = '<b>Төрөл:</b> суулгагч код нь \"mysql\" болгосон<br />
<b>Хост:</b> суулгагч код нь \"localhost\" болгосон <br />
<b>Нэр:</b> өгөгдоийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> суулгагч код нь \"root\" болгосон <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар';
$string['databasesettingshead'] = 'Одоо та ихэнх Моодлын өгөгдөл хадгалагдах өгөгдийн сангийн тохиргоог хийх хэрэгтэй. Энэ өгөгдлийн сан нь үүсчихсэн бөгөөд түүнд хандах хэрэглэгчийн нэр, нууц үг мөн үүссэн байна.
<br />
<br /> <br />
<b>Төрөл:</b> mysql эсвэл postgres7<br />
<b>Хост:</b> жнь localhost эсвэл db.isp.com<br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар';
$string['databasesettingssub'] = '<b>Төрөл:</b> mysql эсвэл postgres7<br />
<b>Хост:</b> жнь localhost эсвэл db.isp.com<br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар';
$string['databasesettingssub_mssql'] = '<b>Төрөл:</b> SQL*Server (non UTF-8) <b><font color=\"red\">Шинэ! (байгуулахад ашиглах зориулалтгүй)</font></b><br />
<b>Хост:</b> жнь localhost эсвэл db.isp.com<br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар(зайлшгүй шаардлагатай)';
$string['databasesettingssub_mssql_n'] = '<b>Төрөл:</b> SQL*Server (UTF-8 идэвхтэй) <br />
<b>Хост:</b> жнь localhost эсвэл db.isp.com<br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар(зайлшгүй шаардлагатай)';
$string['databasesettingssub_mysql'] = '<b>Төрөл:</b> MySQL<br />
<b>Хост:</b> жнь localhost эсвэл db.isp.com<br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар(cонголтынх)';
$string['databasesettingssub_oci8po'] = '<b>Төрөл:</b> Oracle <br />
<b>Хост:</b> ашиглагдахгүй, хоосон орхи <br />
<b>Нэр:</b> tnsnames.ora холболтын өгөгдсөн нэрнээс<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар(cонголтынх, дээд тал нь 2сс.)';
$string['databasesettingssub_odbc_mssql'] = '<b>Төрөл:</b> SQL*Server (ODBC-р дамжиж) <b><font color=\"red\">Шинэ! (байгуулахад ашиглах зориулалтгүй)</font></b><br />
<b>Хост:</b> ODBC дах DSN-ийн өгөгдсөн нэрнүүдээс <br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар(зайлшгүй шаардлагатай)';
$string['databasesettingssub_postgres7'] = '<b>Төрөл:</b> PostgreSQL <br />
<b>Хост:</b> жнь localhost эсвэл db.isp.com<br />
<b>Нэр:</b> өгөгдлийн сангийн нэр, жнь moodle<br />
<b>Хэрэглэгч:</b> таны өгөгдлийн сангийн хэрэглэгчийн нэр <br />
<b>Нууц үг:</b> таны өгөгдлийн сангийн нууц үг<br />
<b>Хүснэгтний угтвар:</b> таны бүх хүснэгтэнд ашиглагдах дурын угтвар(зайлшгүй шаардлагатай)';
$string['dataroot'] = 'Өгөгдлийн директор';
$string['datarooterror'] = 'Таны тодорхойлсон “Өгөгдлийн директор” олдохгүй эсвэл үүсэж чадахгүй байна. Нэг бол замыг нь засварлаж, эсвэл директороо өөрөө үүсгэ.';
$string['dbconnectionerror'] = 'Бид таны тодорхойлсон өгөгдлийн сантай холбогдож чадсангүй.';
$string['dbcreationerror'] = 'Өгөгдлийн сан үүсгэх явцад алдаа гарлаа. Энэ байгаа тохиргоогоор өгөгдлийн сангийн өгөгдсөн нэрийг үүсгэх боломжгүй.';
$string['dbhost'] = 'Хост сервер';
$string['dbprefix'] = 'Хүснэгтний угтвар';
$string['dbtype'] = 'Tөрөл';
$string['dbwrongencoding'] = 'Сонгосон өгөгдлийн сан тань буруу тэмдэгтийн кодтой байна($a). Түүний оронд Юникод(UTF-8) кодтой өгөгдлийн сан ашиглагсан нь илүү дээр. Энэ төрлийн тестийг “ӨС тэмдэгтийн кодын тестийг алгасах” гэж сонгож болно. Гэхдээ ирээдүйд өөр асуудлууд тулгарч магадгүй.';
$string['dbwronghostserver'] = 'Та дээр тайлбарласан “Хост” дүрмийг баримтлах хэрэгтэй.';
$string['dbwrongnlslang'] = 'Таны вэб сервер дэх NLS_LANG гэсэн орчны хувьсагч AL32UTF8 гэсэн тэмдэгтийн код ашиглах ёстой. OCI8-г хэрхэн зөв тохируулахыг РНР-ийн баримтжуулалтаас харна уу.';
$string['dbwrongprefix'] = 'Та дээр тайлбарласан “Хүснэгтний угтвар” дүрмийг баримтлах хэрэгтэй.';
$string['directorysettingshead'] = 'Энэ Моодлийг суулгах байрлалыг дахин шалгана уу.';
$string['directorysettingssub'] = '<p><b>Вэб хаяг:</b>
Моодл байрлах бүтэн вэбийн хаягаа зааж өгнө үү. Хэрвээ танай вэбсайт чинь олон хаягаар дамжин орох боломжтой бол танай оюутнуудын хамгийн их ашиглахыг нь бич. Хаягийн төгсгөлд нь ташуу зураас битгий агуулаарай. <br />
<br />
<b>Моодл хавтас:</b>
Суулгаж буй хавтасныхаа бүтэн хаягийг зааж өг. Том жижиг үсгийн алдаагүй гэдгээ шалгаарай.
<br />
<br />
<b>Өгөгдлийн хавтас:</b>
Танд Моодл сервер руу хуулсан файлаа хадгалах хавтас хэрэгтэй. Энэ хавтас нь уншигддаг мөн БИЧИГДДЭГ байх ёстой. (ихэвчлэн \'хэн ч биш\' эсвэл \'apache\'). Гэхдээ вэбээр дамжиж шууд ханддаг байх ёсгүй.';
$string['dirroot'] = 'Моодл хавтас';
$string['dirrooterror'] = '“Моодл хавтас”-ний тохиргоо буруу байна. Бид Моодлийг суулгах файл тэндээс олсонгүй. Дээрх утга устгагдна.';
$string['download'] = 'Xэрэглэгчийн копьютер луу хуулах';
$string['downloadedfilecheckfailed'] = 'Татаж авсан файлыг шалгах үйл ажиллагаа бүтсэнгүй.';
$string['downloadlanguagebutton'] = '\"$a\" хэлний багц файлыг татаж ав';
$string['downloadlanguagehead'] = 'Xэлний багц файлыг татаж ав';
$string['downloadlanguagenotneeded'] = 'Та хэлний багц файлын анхны утга татаж \"$a\" ашиглаж суулгах үйл ажиллагаагаа үргэлжлүүлж болно.';
$string['downloadlanguagesub'] = 'Та одоо хэлний багц файл татаж аваад түүн дээрээ суулгах үйл ажиллагаа үргэлжлүүлэх боломжтой боллоо. <br /><br /> Хэрвээ та хэлний багц файл татаж авах боломжгүй бол суулгах үйл ажиллагаа Англи хэл дээр үргэлжилнэ. (Суулгах үйл ажиллагаа нэгэнт дууссан хойно нэмэлт хэлний багц файл татаж аваад суулгах боломжтой.)';
$string['environmenterrortodo'] = 'Moodle-н энэ хувилбарыг суулгахаас өмнө та дээр олдсон асуудал болон алдаануудыг засна уу.';
$string['environmenthead'] = 'Таны орчиныг шалгаж байна ...';
$string['environmentrecommendinstall'] = 'суусан/идэвхжсэн байвал зүгээр';
$string['environmentrecommendversion'] = 'та $a->current хувилбар ашиглаж байна $a->needed хувилбарыг ашигласан нь дээр';
$string['environmentrequireinstall'] = 'суусан/идэвхжсэн байх ёстой';
$string['environmentrequireversion'] = 'та $a->current хувилбар ашиглаж байна $a->needed хувилбарыг ашиглагх ёстой';
$string['environmentsub'] = 'Бид таны компьютерийн системийн төрөл бүрийн хүчин зүйлс системийн шаардлагатай нийцэж буй эсэхийг шалгаж байна.';
$string['environmentxmlerror'] = 'Environment өгөгдөл уншихад алдаа гарлаа ($a->error_code)';
$string['error'] = 'Алдаа';
$string['fail'] = 'Бүтсэнгүй';
$string['fileuploads'] = 'Файл сервер рүү хуулах';
$string['fileuploadserror'] = 'Энэ нээлттэй байх ёстой';
$string['gdversion'] = 'GD хувилбар';
$string['gdversionerror'] = 'GD сан нь үйл ажиллагаа болон зураг үүсгэх үед ашиглагдах ёстой';
$string['gdversionhelp'] = '<p>Таны сервер GD суулгаагүй байна.</p>
<p>GD сан нь Моодлийг зураг боловсруулах (хэрэглэгчийн хувийн дүрс зураг гэх мэт), шинэ зураг боловсруулах (хандалтын график зэрэг) боломжтой болгохын тулд PHP-д шаардагддаг. Моодл GD-гүйгээр ажилласан хэвээр байх бөгөөд түүний хүчин зүйлс танд ашиглагдах боломжгүй</p>
<p>GD-г Unix дээр РНР-д нэмэх бол, PHP-гээ --with-gd пaрaмeтр ашиглан хөрвүүл.</p>
<p>Windows үйлдлийн системийн хувьд php.ini файлыг засварлаад referencing php_gd2.dll орших мөрөнд тайлбар битгий бич. </p>';
$string['globalsquotes'] = 'Globals файлыг нууцлалт хамгаалалтгүйгээр удирдах';
$string['globalsquoteserror'] = 'PHP тохиргоонуудаа дараах байдлаар зас: register_globals –г идэвхгүй болго ба/эсвэл magic_quotes_gpc –г идэвхжүүл';
$string['help'] = 'Тусламж';
$string['iconvrecommended'] = 'Латин бус хэл хэрэглэж байгаа бол сайтын ажиллагааг сайжруулахад ICONV library суулгахыг зөвлөж байна.';
$string['info'] = 'Мэдээлэл';
$string['installation'] = 'Суулгах';
$string['invalidmd5'] = 'Буруу md5';
$string['langdownloaderror'] = 'Харамсалтай нь \"$a\" хэл суусангүй. Суулгах үйл ажиллагаа Англи хэл дээр үргэлжлэх болно.';
$string['langdownloadok'] = '\"$a\" хэл амжилттай суулаа. Суулгах үйл ажиллагаа энэ хэл дээр үргэлжлэх болно.';
$string['language'] = 'Хэл';
$string['magicquotesruntime'] = 'Magic Quotes-ийн ажиллах хугацаа';
$string['magicquotesruntimeerror'] = 'Энэ хаалттай байх ёстой';
$string['mbstringrecommended'] = 'Таны сайт латин бус хэл ашигладаг бол сайтын ажиллагааг сайжруулая гэвэл MBSTRING library суулгахыг зөвлөж байна.';
$string['memorylimit'] = 'Санах ойн хязгаар';
$string['memorylimiterror'] = 'PHP санах ойн хязгаар нь маш багаар тохируулсан… та дараа нь асуудалтай тулгарч магад';
$string['memorylimithelp'] = '<p>Таны серверийн PHP санах ойн хязгаар нь $a гэж тохируулсан байна.</p>
<p>Энэ нь Моодл сүүлд санах ойн асуудлууд ялангуяа олон модуль ба/эсвэл олон хэрэглэгч идэвхжүүлсэн үед учирч болзошгүй. </p>
<p>Бид танд зөвлөхөд РНР-гээ боломжит дээд хязгаартайгаар жишээ нь 16М болгож тохируул. Үүний тулд хэд хэдэн арга байна: </p>
<ol>
<li>Хэрвээ та PHP-г <i>--enable-memory-limit</i>-тай дахин хөрвүүлэх боломжтой бол. Энэ нь Моодлийг санах ойн хязгаарыг өөрөө тогтоох боломжтой болгоно. </li>
<li>Хэрвээ та php.ini файлдаа хандаж чадвал, <b>memory_limit</b> гэсэн тохиргоог 16M гэх мэтээр өөрчилж болно. Хэрвээ хандалт байхгүй бол админаараа үүнийг хийлгэнэ үү.</li>
<li>Зарим PHP сервер дээр Моодл хавтсан дотроо дараах мөр агуулсан .htaccess файл үүсгэж болно: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Зарим сервер дээр энэ нь <b>бүх</b> PHP хуудсуудыг ажиллахгүй болгоно (та хуудаснууд руу орох юм бол алдааг нь харах болно). Тиймээс .htaccess файлыг устгах хэрэгтэй болно.</p></li>
</ol>';
$string['missingrequiredfield'] = 'Зарим шаардлагатай талбар орхигдсон байна.';
$string['mssql'] = 'SQL*Server (mssql)';
$string['mssql_n'] = 'SQL*Server UTF-8 кодыг дэмжинэ (mssql_n)';
$string['mssqlextensionisnotpresentinphp'] = 'PHP нь MSSQL өргөтгөлтэй зөв тохируулагдаагүй учраас SQL*Server-тэй холбогдож болно. php.ini файлаа шалга эсвэл PHP дахин ажиллуул.';
$string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Гэхдээ таны сайт зөвхөн iso-8859-1 (latin) хэлнүүд хэрэглэдэг бол та сая суулгасан MySQL 4.1.12 (or higher) үргэлжлүүлэн ашиглаж болно.';
$string['mysql416required'] = 'Бүх өгөгдөл utf-8 рүү шилжих боломжтой moodle 1.6 суулгахын тулд та дор хаяж mysql 4.1.16 суулгах шаардлагатай.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP нь MySQL өргөтгөлтэй зөв тохируулагдаагүй учраас MySQL-тэй холбогдож болно. php.ini файлаа шалга эсвэл PHP дахин ажиллуул.';
$string['name'] = 'Нэр';
$string['next'] = 'Дараагийн';
$string['oci8po'] = 'Oracle (oci8po)';
$string['ociextensionisnotpresentinphp'] = 'PHP нь OCI8 өргөтгөлтэй зөв тохируулагдаагүй учраас Oracle-тэй холбогдож болно. php.ini файлаа шалга эсвэл PHP дахин ажиллуул.';
$string['odbc_mssql'] = 'SQL*Server over ODBC (odbc_mssql)';
$string['odbcextensionisnotpresentinphp'] = 'PHP нь ODBC өргөтгөлтэй зөв тохируулагдаагүй учраас SQL*Server-тэй холбогдож болно. php.ini файлаа шалга эсвэл PHP дахин ажиллуул.';
$string['ok'] = 'ok';
$string['pass'] = 'Шилжих';
$string['password'] = 'нууц үг';
$string['pgsqlextensionisnotpresentinphp'] = 'PHP нь PGSQL өргөтгөлтэй зөв тохируулагдаагүй учраас PostgreSQL-тэй холбогдож болно. php.ini файлаа шалга эсвэл PHP дахин ажиллуул.';
$string['php50restricted'] = 'PHP 5.0.x нь нэлээд алдаатай гэдэг нь илэрсэн. Дээд хувилбар 5.1.x эсвэл доод хувилбар 4.3.x болон 4.4.x болго.';
$string['phpversion'] = 'РНР хувилбар';
$string['phpversionerror'] = 'РНР хувилбар нь хамгийн багадаа 4.3.0 эсвэл 5.1.0 байх ёстой (5.0.x нь алдаануудтай).';
$string['phpversionhelp'] = '<p>Mooдл нь РНР хувилбарын хамгийн багадаа 4.3.0 эсвэл 5.1.0 байхыг шаарддаг (5.0.x нь алдаануудтай).</p>
<p>Та одоо $a хувилбар ажиллуулж байна</p>
<p>Та PHP-гээ шинэчлэх эсвэл PHP-ийн шинэ хувилбар бүхий хост руу шилжүүл!<br/>
(5.0.x тохиолдолд доошоо 4.4.x хувилбар руу орж болно)</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Өмнөх';
$string['remotedownloadnotallowed'] = 'Танай сервер хүлээн зөвшөөрөөгүй зүйлсийг татаж авах (allow_url_fopen нь идэвхжээгүй).<br /><br />Та <a href=\"$a->url\">$a->url</a> файлыг өөрөө татаж аваад, түүнийгээ таны сэрвэр дэх \"$a->dest\" руу хуулаад, тэндээ задал.';
$string['report'] = 'Тайлан';
$string['safemode'] = 'Аюулгүй горим';
$string['safemodeerror'] = 'Mooдл аюулгүй горимын үед асуудалд орж магадгүй.';
$string['sessionautostart'] = 'Холболтын хугацаа автоматаар эхлэх';
$string['sessionautostarterror'] = 'Энэ хаалттай байх ёстой';
$string['skipdbencodingtest'] = 'Өгөгдлийн сангийн тэмдэгтийн кодын тестийг алгасах';
$string['status'] = 'байдал';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Монгол';
$string['unicoderecommended'] = 'Бүх өгөгдлөө Unicode (UTF-8) дээр хадгалах шаардлагатай. Шинээр суулгах үед өгөгдлийн сангууд нь Unicode дээр байх ёстой. Хэрвээ та сайжруулах гэж байвал UTF-8 шилжүүлэх үйл ажиллагааг хийх ёстой (Админ хуудсыг хар).';
$string['unicoderequired'] = 'Бүх өгөгдлөө Unicode (UTF-8) дээр хадгалах шаардлагатай. Шинээр суулгах үед өгөгдлийн сангууд нь Unicode дээр байх ёстой. Хэрвээ та сайжруулах гэж байвал UTF-8 шилжүүлэх үйл ажиллагааг хийх ёстой (Админ хуудсыг хар';
$string['user'] = 'Хэрэглэгч';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = 'Та <strong>$a->packname $a->packversion</strong> багцыг компьютер дээрээ амжилттай суулгаж ажиллуулсан тул энэ хуудсыг харж байна. Баяр хүргэе!';
$string['welcomep30'] = '<strong>$a->installername</strong> -ний энэ хувилбар нь <strong>Mooдл</strong> ажиллах орчныг үүсгэх програмууд агуулсан, тэдгээр нь:';
$string['welcomep40'] = 'Энэ багц нь мөн <strong>Mooдл $a->moodlerelease ($a->moodleversion)</strong>-г агуулсан.';
$string['welcomep50'] = 'Энэ багц доторх бүх програмууд нь өөрсдийн лизенцтэй. Бүрэн <strong>$a->installername</strong> багц нь
<a href=\"http://www.opensource.org/docs/definition_plain.html\">open source</a> бөгөөд <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a> -ийн лизенцийн дор түгээгддэг.';
$string['welcomep60'] = 'Дараагийн хуудсууд нь компьютер дээрээ <strong>Mooдл</strong> тохируулах тааруулах энгийн алхмуудыг агуулсан байгаа. Та анхны утгын тохиргоонуудыг хүлээн авч болно, эсвэл өөрийн хэрэгцээнд нийцүүлэн өөрчилж болно.';
$string['welcomep70'] = '<strong>Mooдлээ</strong> тохируулахын тулд доорх “Үргэлжлүүлэх” товчин дээр дарж цааж явна уу.';
$string['wrongdestpath'] = 'Буруу очих зам байна. .';
$string['wrongsourcebase'] = 'Буруу хаягийн мэдээлэл байна.';
$string['wrongzipfilename'] = 'Буруу архивласан файлын нэр байна.';
$string['wwwroot'] = 'Вэб хаяг';
$string['wwwrooterror'] = '“Вэб хаяг” хүчингүй байна- энэ Моодлийн суулгах програм тэнд харагдахгүй байна. Доорх утга нь устгагдсан.';
?>
+2 -2
View File
@@ -10,7 +10,7 @@
/// using strings defined in installer_strings (same dir)
$string['check'] = 'Sjekk';
$string['closewindow'] = 'Lukk dette vinduet';
$string['closewindow'] = 'Lukk dette vindauget';
$string['continue'] = 'Hald fram';
$string['error'] = 'Feil';
$string['help'] = 'Hjelp';
@@ -23,6 +23,6 @@ $string['password'] = 'Passord';
$string['previous'] = 'Forrige';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'Norsk - Nynorsk';
$string['thislanguage'] = 'Norsk - nynorsk';
$string['user'] = 'Brukar';
?>
+52
View File
@@ -0,0 +1,52 @@
<?php
/// Please, do not edit this file manually! It's auto generated from
/// contents stored in your standard lang pack files:
/// (langconfig.php, install.php, moodle.php, admin.php and error.php)
///
/// If you find some missing string in Moodle installation, please,
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Administratorning ko\'rsatilgan katalogi noto\'g\'ri';
$string['admindirname'] = 'Administrator katalogi nomi';
$string['caution'] = 'Ogohlantirish';
$string['check'] = 'Belgilash';
$string['chooselanguage'] = 'Tilni tanlang';
$string['closewindow'] = 'Darchani yopish';
$string['compatibilitysettings'] = 'PHP sozlanmalarini tekshirish...';
$string['configfilewritten'] = 'config.php muvafaqqiyatli yaratildi';
$string['configurationcomplete'] = 'Sozlash yakunlandi';
$string['continue'] = 'Davom ettirish';
$string['database'] = 'Ma\'lumotlar bazasi';
$string['dataroot'] = 'Ma\'lumotlar katalogi';
$string['dbhost'] = 'Server xosti';
$string['dbpass'] = 'Parol';
$string['dbprefix'] = 'Jadvallar prefiksi';
$string['dbtype'] = 'Tur';
$string['dirroot'] = 'Moodle kataloglari';
$string['download'] = 'CHaqirish';
$string['doyouagree'] = 'SHartlar bilan tanishdingizmi?';
$string['error'] = 'Xato';
$string['fail'] = 'Xato';
$string['gdversion'] = 'GD versiya';
$string['help'] = 'YOrdam';
$string['info'] = 'Ma\'lumot';
$string['installation'] = 'O\'rnatish';
$string['invalidemail'] = 'e-mail uchun noto\'g\'ri format';
$string['language'] = 'Til';
$string['memorylimit'] = 'Xotira chegarasi';
$string['moodledocslink'] = 'Bu sahifa uchun Moodle xujjatlari';
$string['name'] = 'Nom';
$string['next'] = 'Dalshe';
$string['ok'] = 'OK';
$string['password'] = 'Parol';
$string['previous'] = 'Oldingi';
$string['report'] = 'Hisobot';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'O\'zbekcha';
$string['user'] = 'Foydalanuvchi';
?>
+1
View File
@@ -159,6 +159,7 @@ $string['filtermatchoneperpage'] = 'Filter match once per page';
$string['filtermatchonepertext'] = 'Filter match once per text';
$string['filteruploadedfiles'] = 'Filter uploaded files';
$string['globalsquoteswarning'] = '<p><strong>Security Warning</strong>: to operate properly, Moodle requires <br />that you make certain changes to your current PHP settings.<p/><p>You <em>must</em> set <code>register_globals=off</code> and/or <code>magic_quotes_gpc=on</code>. <br />If possible, you should set <code>register_globals=off</code> to improve general <br /> server security, setting <code>magic_quotes_gpc=on</code> is also recommended.<p/><p>These settings are controlled by editing your <code>php.ini</code>, Apache/IIS <br />configuration or <code>.htaccess</code> file.</p>';
$string['globalswarning'] = '<p><strong>Security Warning</strong>: to operate properly, Moodle requires <br />that you make certain changes to your current PHP settings.<p/><p>You <em>must</em> set <code>register_globals=off</code>.<p>This setting is controlled by editing your <code>php.ini</code>, Apache/IIS <br />configuration or <code>.htaccess</code> file.</p>';
$string['helpadminseesall'] = 'Do admins see all calendar events or just those that apply to themselves?';
$string['helpcalendarsettings'] = 'Configure various calendar and date/time-related aspects of Moodle';
$string['helpforcetimezone'] = 'You can allow users to individually select their timezone, or force a timezone for everyone.';
+177 -165
View File
@@ -1,246 +1,258 @@
<?php // $Id$
// countries.php - created with Moodle 1.2 development (2003111400)
<?PHP // $Id$
// countries.php - created with Moodle 1.7 beta + (2006101003)
// http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm
//
// UPDATE NOTE - When country codes are deleted or re-assigned,
// you must re-assign users to a valid country, doing both:
// 1 - add an upgrade path in /lib/db/upgrade.php
// 2 - add a line in the $country_update_map array, in
// /backup/restorelib.php
$string['AD'] = 'Andorra';
$string['AE'] = 'United Arab Emirates';
$string['AF'] = 'Afghanistan';
$string['AG'] = 'Antigua and Barbuda';
$string['AI'] = 'Anguilla';
$string['AX'] = 'Åland Islands';
$string['AL'] = 'Albania';
$string['AM'] = 'Armenia';
$string['AN'] = 'Netherlands Antilles';
$string['AO'] = 'Angola';
$string['AQ'] = 'Antarctica';
$string['AR'] = 'Argentina';
$string['DZ'] = 'Algeria';
$string['AS'] = 'American Samoa';
$string['AT'] = 'Austria';
$string['AU'] = 'Australia';
$string['AD'] = 'Andorra';
$string['AO'] = 'Angola';
$string['AI'] = 'Anguilla';
$string['AQ'] = 'Antarctica';
$string['AG'] = 'Antigua And Barbuda';
$string['AR'] = 'Argentina';
$string['AM'] = 'Armenia';
$string['AW'] = 'Aruba';
$string['AU'] = 'Australia';
$string['AT'] = 'Austria';
$string['AZ'] = 'Azerbaijan';
$string['BA'] = 'Bosnia and Herzegovina';
$string['BB'] = 'Barbados';
$string['BD'] = 'Bangladesh';
$string['BE'] = 'Belgium';
$string['BF'] = 'Burkina Faso';
$string['BG'] = 'Bulgaria';
$string['BS'] = 'Bahamas';
$string['BH'] = 'Bahrain';
$string['BI'] = 'Burundi';
$string['BD'] = 'Bangladesh';
$string['BB'] = 'Barbados';
$string['BY'] = 'Belarus';
$string['BE'] = 'Belgium';
$string['BZ'] = 'Belize';
$string['BJ'] = 'Benin';
$string['BM'] = 'Bermuda';
$string['BN'] = 'Brunei Darussalam';
$string['BO'] = 'Bolivia';
$string['BR'] = 'Brazil';
$string['BS'] = 'Bahamas';
$string['BT'] = 'Bhutan';
$string['BV'] = 'Bouvet Island';
$string['BO'] = 'Bolivia';
$string['BA'] = 'Bosnia And Herzegovina';
$string['BW'] = 'Botswana';
$string['BY'] = 'Belarus';
$string['BZ'] = 'Belize';
$string['CA'] = 'Canada';
$string['CC'] = 'Cocos (Keeling) Islands';
$string['CF'] = 'Central African Republic';
$string['CG'] = 'Congo';
$string['CH'] = 'Switzerland';
$string['CI'] = 'Cote D\'Ivoire';
$string['CK'] = 'Cook Islands';
$string['CL'] = 'Chile';
$string['BV'] = 'Bouvet Island';
$string['BR'] = 'Brazil';
$string['IO'] = 'British Indian Ocean Territory';
$string['BN'] = 'Brunei Darussalam';
$string['BG'] = 'Bulgaria';
$string['BF'] = 'Burkina Faso';
$string['BI'] = 'Burundi';
$string['KH'] = 'Cambodia';
$string['CM'] = 'Cameroon';
$string['CN'] = 'China';
$string['CO'] = 'Colombia';
$string['CR'] = 'Costa Rica';
$string['CS'] = 'Serbia and Montenegro';
$string['CU'] = 'Cuba';
$string['CA'] = 'Canada';
$string['CV'] = 'Cape Verde';
$string['KY'] = 'Cayman Islands';
$string['CF'] = 'Central African Republic';
$string['TD'] = 'Chad';
$string['CL'] = 'Chile';
$string['CN'] = 'China';
$string['CX'] = 'Christmas Island';
$string['CC'] = 'Cocos (Keeling) Islands';
$string['CO'] = 'Colombia';
$string['KM'] = 'Comoros';
$string['CG'] = 'Congo';
$string['CD'] = 'Congo, The Democratic Republic Of The';
$string['CK'] = 'Cook Islands';
$string['CR'] = 'Costa Rica';
$string['CI'] = 'Côte D\'Ivoire';
$string['HR'] = 'Croatia';
$string['CU'] = 'Cuba';
$string['CY'] = 'Cyprus';
$string['CZ'] = 'Czech Republic';
$string['DE'] = 'Germany';
$string['DJ'] = 'Djibouti';
$string['DK'] = 'Denmark';
$string['DJ'] = 'Djibouti';
$string['DM'] = 'Dominica';
$string['DO'] = 'Dominican Republic';
$string['DZ'] = 'Algeria';
$string['EC'] = 'Ecuador';
$string['EE'] = 'Estonia';
$string['EG'] = 'Egypt';
$string['EH'] = 'Western Sahara';
$string['SV'] = 'El Salvador';
$string['GQ'] = 'Equatorial Guinea';
$string['ER'] = 'Eritrea';
$string['ES'] = 'Spain';
$string['EE'] = 'Estonia';
$string['ET'] = 'Ethiopia';
$string['FI'] = 'Finland';
$string['FJ'] = 'Fiji';
$string['FK'] = 'Falkland Islands (Malvinas)';
$string['FM'] = 'Micronesia; Federated States of';
$string['FO'] = 'Faroe Islands';
$string['FJ'] = 'Fiji';
$string['FI'] = 'Finland';
$string['FR'] = 'France';
$string['FX'] = 'France; Metropolitan';
$string['GA'] = 'Gabon';
$string['GB'] = 'United Kingdom';
$string['GD'] = 'Grenada';
$string['GE'] = 'Georgia';
$string['GF'] = 'French Guiana';
$string['PF'] = 'French Polynesia';
$string['TF'] = 'French Southern Territories';
$string['GA'] = 'Gabon';
$string['GM'] = 'Gambia';
$string['GE'] = 'Georgia';
$string['DE'] = 'Germany';
$string['GH'] = 'Ghana';
$string['GI'] = 'Gibraltar';
$string['GL'] = 'Greenland';
$string['GM'] = 'Gambia';
$string['GN'] = 'Guinea';
$string['GP'] = 'Guadeloupe';
$string['GQ'] = 'Equatorial Guinea';
$string['GR'] = 'Greece';
$string['GT'] = 'Guatemala';
$string['GL'] = 'Greenland';
$string['GD'] = 'Grenada';
$string['GP'] = 'Guadeloupe';
$string['GU'] = 'Guam';
$string['GT'] = 'Guatemala';
$string['GG'] = 'Guernsey';
$string['GN'] = 'Guinea';
$string['GW'] = 'Guinea-Bissau';
$string['GY'] = 'Guyana';
$string['HK'] = 'Hong Kong';
$string['HM'] = 'Heard and Mc Donald Islands';
$string['HN'] = 'Honduras';
$string['HR'] = 'Croatia (Hrvatska)';
$string['HT'] = 'Haiti';
$string['HM'] = 'Heard Island And Mcdonald Islands';
$string['VA'] = 'Holy See (Vatican City State)';
$string['HN'] = 'Honduras';
$string['HK'] = 'Hong Kong';
$string['HU'] = 'Hungary';
$string['ID'] = 'Indonesia';
$string['IE'] = 'Ireland';
$string['IL'] = 'Israel';
$string['IN'] = 'India';
$string['IO'] = 'British Indian Ocean Territory';
$string['IQ'] = 'Iraq';
$string['IR'] = 'Iran (Islamic Republic of)';
$string['IS'] = 'Iceland';
$string['IN'] = 'India';
$string['ID'] = 'Indonesia';
$string['IR'] = 'Iran, Islamic Republic Of';
$string['IQ'] = 'Iraq';
$string['IE'] = 'Ireland';
$string['IM'] = 'Isle Of Man';
$string['IL'] = 'Israel';
$string['IT'] = 'Italy';
$string['JM'] = 'Jamaica';
$string['JO'] = 'Jordan';
$string['JP'] = 'Japan';
$string['KE'] = 'Kenya';
$string['KG'] = 'Kyrgyzstan';
$string['KH'] = 'Cambodia';
$string['KI'] = 'Kiribati';
$string['KM'] = 'Comoros';
$string['KN'] = 'Saint Kitts and Nevis';
$string['KO'] = 'Kosovo';
$string['KP'] = 'Korea; Democratic People\'s Republic of';
$string['KR'] = 'Korea; Republic of';
$string['KW'] = 'Kuwait';
$string['KY'] = 'Cayman Islands';
$string['JE'] = 'Jersey';
$string['JO'] = 'Jordan';
$string['KZ'] = 'Kazakhstan';
$string['LA'] = 'Lao People\'s Democratic Republic';
$string['KE'] = 'Kenya';
$string['KI'] = 'Kiribati';
$string['KP'] = 'Korea, Democratic People\'S Republic Of';
$string['KR'] = 'Korea, Republic Of';
$string['KW'] = 'Kuwait';
$string['KG'] = 'Kyrgyzstan';
$string['LA'] = 'Lao People\'S Democratic Republic';
$string['LV'] = 'Latvia';
$string['LB'] = 'Lebanon';
$string['LC'] = 'Saint Lucia';
$string['LI'] = 'Liechtenstein';
$string['LK'] = 'Sri Lanka';
$string['LR'] = 'Liberia';
$string['LS'] = 'Lesotho';
$string['LR'] = 'Liberia';
$string['LY'] = 'Libyan Arab Jamahiriya';
$string['LI'] = 'Liechtenstein';
$string['LT'] = 'Lithuania';
$string['LU'] = 'Luxembourg';
$string['LV'] = 'Latvia';
$string['LY'] = 'Libyan Arab Jamahiriya';
$string['MA'] = 'Morocco';
$string['MC'] = 'Monaco';
$string['MD'] = 'Moldova; Republic of';
$string['MO'] = 'Macao';
$string['MK'] = 'Macedonia, The Former Yugoslav Republic Of';
$string['MG'] = 'Madagascar';
$string['MH'] = 'Marshall Islands';
$string['MK'] = 'Macedonia; Former Yugoslav Republic of';
$string['MW'] = 'Malawi';
$string['MY'] = 'Malaysia';
$string['MV'] = 'Maldives';
$string['ML'] = 'Mali';
$string['MM'] = 'Myanmar';
$string['MN'] = 'Mongolia';
$string['MO'] = 'Macau';
$string['MP'] = 'Northern Mariana Islands';
$string['MT'] = 'Malta';
$string['MH'] = 'Marshall Islands';
$string['MQ'] = 'Martinique';
$string['MR'] = 'Mauritania';
$string['MS'] = 'Montserrat';
$string['MT'] = 'Malta';
$string['MU'] = 'Mauritius';
$string['MV'] = 'Maldives';
$string['MW'] = 'Malawi';
$string['YT'] = 'Mayotte';
$string['MX'] = 'Mexico';
$string['MY'] = 'Malaysia';
$string['FM'] = 'Micronesia, Federated States Of';
$string['MD'] = 'Moldova, Republic Of';
$string['MC'] = 'Monaco';
$string['MN'] = 'Mongolia';
$string['ME'] = 'Montenegro';
$string['MS'] = 'Montserrat';
$string['MA'] = 'Morocco';
$string['MZ'] = 'Mozambique';
$string['MM'] = 'Myanmar';
$string['NA'] = 'Namibia';
$string['NC'] = 'New Caledonia';
$string['NE'] = 'Niger';
$string['NF'] = 'Norfolk Island';
$string['NG'] = 'Nigeria';
$string['NI'] = 'Nicaragua';
$string['NL'] = 'Netherlands';
$string['NO'] = 'Norway';
$string['NP'] = 'Nepal';
$string['NR'] = 'Nauru';
$string['NU'] = 'Niue';
$string['NP'] = 'Nepal';
$string['NL'] = 'Netherlands';
$string['AN'] = 'Netherlands Antilles';
$string['NC'] = 'New Caledonia';
$string['NZ'] = 'New Zealand';
$string['NI'] = 'Nicaragua';
$string['NE'] = 'Niger';
$string['NG'] = 'Nigeria';
$string['NU'] = 'Niue';
$string['NF'] = 'Norfolk Island';
$string['MP'] = 'Northern Mariana Islands';
$string['NO'] = 'Norway';
$string['OM'] = 'Oman';
$string['PA'] = 'Panama';
$string['PE'] = 'Peru';
$string['PF'] = 'French Polynesia';
$string['PG'] = 'Papua New Guinea';
$string['PH'] = 'Philippines';
$string['PK'] = 'Pakistan';
$string['PL'] = 'Poland';
$string['PM'] = 'St. Pierre and Miquelon';
$string['PN'] = 'Pitcairn';
$string['PR'] = 'Puerto Rico';
$string['PS'] = 'Palestine';
$string['PT'] = 'Portugal';
$string['PW'] = 'Palau';
$string['PS'] = 'Palestinian Territory, Occupied';
$string['PA'] = 'Panama';
$string['PG'] = 'Papua New Guinea';
$string['PY'] = 'Paraguay';
$string['PE'] = 'Peru';
$string['PH'] = 'Philippines';
$string['PN'] = 'Pitcairn';
$string['PL'] = 'Poland';
$string['PT'] = 'Portugal';
$string['PR'] = 'Puerto Rico';
$string['QA'] = 'Qatar';
$string['RE'] = 'Reunion';
$string['RE'] = 'Réunion';
$string['RO'] = 'Romania';
$string['RU'] = 'Russian Federation';
$string['RW'] = 'Rwanda';
$string['SA'] = 'Saudi Arabia';
$string['SB'] = 'Solomon Islands';
$string['SC'] = 'Seychelles';
$string['SD'] = 'Sudan';
$string['SE'] = 'Sweden';
$string['SG'] = 'Singapore';
$string['SH'] = 'St. Helena';
$string['SI'] = 'Slovenia';
$string['SJ'] = 'Svalbard and Jan Mayen Islands';
$string['SK'] = 'Slovakia (Slovak Republic)';
$string['SL'] = 'Sierra Leone';
$string['BL'] = 'Saint Barthélemy';
$string['SH'] = 'Saint Helena';
$string['KN'] = 'Saint Kitts And Nevis';
$string['LC'] = 'Saint Lucia';
$string['MF'] = 'Saint Martin';
$string['PM'] = 'Saint Pierre And Miquelon';
$string['VC'] = 'Saint Vincent And The Grenadines';
$string['WS'] = 'Samoa';
$string['SM'] = 'San Marino';
$string['ST'] = 'Sao Tome And Principe';
$string['SA'] = 'Saudi Arabia';
$string['SN'] = 'Senegal';
$string['RS'] = 'Serbia';
$string['SC'] = 'Seychelles';
$string['SL'] = 'Sierra Leone';
$string['SG'] = 'Singapore';
$string['SK'] = 'Slovakia';
$string['SI'] = 'Slovenia';
$string['SB'] = 'Solomon Islands';
$string['SO'] = 'Somalia';
$string['ZA'] = 'South Africa';
$string['GS'] = 'South Georgia And The South Sandwich Islands';
$string['ES'] = 'Spain';
$string['LK'] = 'Sri Lanka';
$string['SD'] = 'Sudan';
$string['SR'] = 'Suriname';
$string['ST'] = 'Sao Tome and Principe';
$string['SV'] = 'El Salvador';
$string['SY'] = 'Syrian Arab Republic';
$string['SJ'] = 'Svalbard And Jan Mayen';
$string['SZ'] = 'Swaziland';
$string['TC'] = 'Turks and Caicos Islands';
$string['TD'] = 'Chad';
$string['TF'] = 'French Southern Territories';
$string['TG'] = 'Togo';
$string['TH'] = 'Thailand';
$string['SE'] = 'Sweden';
$string['CH'] = 'Switzerland';
$string['SY'] = 'Syrian Arab Republic';
$string['TW'] = 'Taiwan, Province Of China';
$string['TJ'] = 'Tajikistan';
$string['TZ'] = 'Tanzania, United Republic Of';
$string['TH'] = 'Thailand';
$string['TL'] = 'Timor-Leste';
$string['TG'] = 'Togo';
$string['TK'] = 'Tokelau';
$string['TM'] = 'Turkmenistan';
$string['TN'] = 'Tunisia';
$string['TO'] = 'Tonga';
$string['TP'] = 'East Timor';
$string['TT'] = 'Trinidad And Tobago';
$string['TN'] = 'Tunisia';
$string['TR'] = 'Turkey';
$string['TT'] = 'Trinidad and Tobago';
$string['TM'] = 'Turkmenistan';
$string['TC'] = 'Turks And Caicos Islands';
$string['TV'] = 'Tuvalu';
$string['TW'] = 'Taiwan';
$string['TZ'] = 'Tanzania; United Republic of';
$string['UA'] = 'Ukraine';
$string['UG'] = 'Uganda';
$string['US'] = 'United States of America';
$string['UA'] = 'Ukraine';
$string['AE'] = 'United Arab Emirates';
$string['GB'] = 'United Kingdom';
$string['US'] = 'United States';
$string['UM'] = 'United States Minor Outlying Islands';
$string['UY'] = 'Uruguay';
$string['UZ'] = 'Uzbekistan';
$string['VA'] = 'Vatican City State (Holy See)';
$string['VC'] = 'Saint Vincent and the Grenadines';
$string['VE'] = 'Venezuela';
$string['VG'] = 'Virgin Islands (British)';
$string['VI'] = 'Virgin Islands (U.S.)';
$string['VN'] = 'Vietnam';
$string['VU'] = 'Vanuatu';
$string['WA'] = 'Wales';
$string['WF'] = 'Wallis And Futuna Islands';
$string['WS'] = 'Samoa';
$string['VE'] = 'Venezuela';
$string['VN'] = 'Viet Nam';
$string['VG'] = 'Virgin Islands, British';
$string['VI'] = 'Virgin Islands, U.S.';
$string['WF'] = 'Wallis And Futuna';
$string['EH'] = 'Western Sahara';
$string['YE'] = 'Yemen';
$string['YT'] = 'Mayotte';
$string['ZA'] = 'South Africa';
$string['ZM'] = 'Zambia';
$string['ZR'] = 'Zaire';
$string['ZW'] = 'Zimbabwe';
?>
+1 -1
View File
@@ -16,7 +16,7 @@
The quiz will be displayed in format for v6 browsers
</p>
<p>
<b>v5</b></b><br />
<b>v5</b><br />
The quiz will be displayed in a format for v5 browsers
</p>
<p>
+26
View File
@@ -0,0 +1,26 @@
<?php
$string['addmoreanswerblanks'] = 'Add another answer blank.';
$string['addmoreunitblanks'] = 'Blanks for $a More Units';
$string['answerhdr'] = 'Answer';
$string['atleastoneanswer'] = 'You need to provide at least one answer.';
$string['correctanswershows'] = 'Correct answer shows';
$string['correctanswershowsformat'] = 'Format';
$string['existingcategory1'] = 'will use an already existing shared dataset';
$string['keptcategory1'] = 'will use the same existing shared dataset as before';
$string['keptlocal1'] = 'will use the same existing private dataset as before';
$string['makecopynextpage'] = 'Next Page (new question)';
$string['mandatoryhdr']='Mandatory wild cards present in answers';
$string['mustbenumeric'] = 'You must enter a number here.';
$string['mustnotbenumeric'] = 'This can\'t be a number.';
$string['newcategory1'] = 'will use a new shared dataset';
$string['newlocal1'] = 'will use a new private dataset';
$string['nextitemtoadd'] = 'Next \'Item to Add\'';
$string['nextpage'] = 'Next Page';
$string['nodataset'] = 'nothing - it is not a wild card';
$string['nosharedwildcard'] = 'No shared wild card in this category';
$string['possiblehdr']='Possible wild cards present only in the question text';
$string['tolerance'] = 'Tolerance &plusmn;';
$string['updatecategory'] = 'Update the category';
$string['usedinquestion']='Used in Question';
$string['youmustenteramultiplierhere'] = 'You must enter a multiplier here.';
?>
+45
View File
@@ -0,0 +1,45 @@
<?php
$string['additem'] = 'Add Item';
$string['atleastonerealdataset']='There should be at least one real dataset in question text';
$string['atleastonewildcard']='There should be at least one wild card in answer formula or question text';
$string['calcdistribution'] = 'Distribution';
$string['calclength'] = 'Decimal Places';
$string['calcmax'] = 'Maximum';
$string['calcmin'] = 'Minimum';
$string['dataitemdefined']='with $a numerical values already defined is available';
$string['datasetrole']= ' The wild cards <strong>{x..}</strong> will be substituted by a numerical value from their dataset';
$string['deletelastitem'] = 'Delete Last Item';
$string['existingcategory1'] = 'a literal from an already existing set of literals that are also used by other questions in this category';
$string['existingcategory2'] = 'a file from an already existing set of files that are also used by other questions in this category';
$string['existingcategory3'] = 'a link from an already existing set of links that are also used by other questions in this category';
$string['forceregeneration'] = 'force regeneration';
$string['getnextnow'] = 'Get New \'Item to Add\' Now';
$string['itemno'] = 'Item $a';
$string['itemscount']='Items<br/>Count';
$string['itemtoadd'] = 'Item To Add';
$string['keptcategory1'] = 'a literal from the same category reusable set of literals as before';
$string['keptcategory2'] = 'a file from the same category reusable set of files as before';
$string['keptcategory3'] = 'a link from the same category reusable set of links as before';
$string['keptlocal1'] = 'a literal from the same question private set of literals as before';
$string['keptlocal2'] = 'a file from the same question private set of files as before';
$string['keptlocal3'] = 'a link from the same question private set of links as before';
$string['loguniform'] = 'Loguniform';
$string['minmax'] = 'Range of Values';
$string['newcategory1'] = 'a literal from a new set of literals that may also be used by other questions in this category';
$string['newcategory2'] = 'a file from a new set of files that may also be used by other questions in this category';
$string['newcategory3'] = 'a link from a new set of links that may also be used by other questions in this category';
$string['newlocal1'] = 'a literal from a new set of literals that will only be used by this question';
$string['newlocal2'] = 'a file from a new set of files that will only be used by this question';
$string['newlocal3'] = 'a link from a new set of links that will only be used by this question';
$string['nodataset'] = 'nothing - it is not a wild card';
$string['param'] = 'Param {<strong>$a</strong>}';
$string['replacewithrandom'] = 'Replace with a random value';
$string['reuseifpossible'] = 'reuse previous value if available';
$string['sharedwildcard']='Shared wild card';
$string['sharedwildcards']='Shared wild cards';
$string['switchtocondensedtable']='Switch to Condensed Table >>';
$string['switchtonormaltable']='Switch to Normal Table >>';
$string['uniform'] = 'Uniform';
$string['updatedatasetparam'] = 'Update the datasets parameters';
$string['youmustaddatleastoneitem'] = 'You must add at least one dataset item before you can save this question.';
?>
+2 -2
View File
@@ -511,7 +511,7 @@ function count_records_select($table, $select='', $countitem='COUNT(*)') {
function count_records_sql($sql) {
$rs = get_recordset_sql($sql);
if ($rs) {
if (is_object($rs) and is_array($rs->fields)) {
return $rs->fields[0];
} else {
return 0;
@@ -3178,4 +3178,4 @@ function category_parent_visible($parent = 0) {
}
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
?>
?>
+14 -1
View File
@@ -1989,7 +1989,20 @@ function main_upgrade($oldversion=0) {
set_field('modules', 'version', 2005031422, 'name', 'hotpot');
}
}
if ($result && $oldversion < 2006050561) {
$db->debug = false;
notify('Updating country list according to recent official ISO listing...', 'notifysuccess');
// re-assign users to valid countries
set_field('user', 'country', 'CD', 'country', 'ZR'); // Zaire is now Congo Democratique
set_field('user', 'country', 'TL', 'country', 'TP'); // Timor has changed
set_field('user', 'country', 'FR', 'country', 'FX'); // France metropolitaine doesn't exist
set_field('user', 'country', 'RS', 'country', 'KO'); // Kosovo is part of Serbia, "under the auspices of the United Nations, pursuant to UN Security Council Resolution 1244 of 10 June 1999."
set_field('user', 'country', 'GB', 'country', 'WA'); // Wales is part of UK (ie Great Britain)
set_field('user', 'country', 'RS', 'country', 'CS'); // Re-assign Serbia-Montenegro to Serbia. This is arbitrary, but there is no way to make an automatic decision on this.
notify('...update complete. Remember to update your language packs to get the most recent country names definitions and codes. This is especially important for sites with users from Congo (now CD), Timor (now TL), Kosovo (now RS), Wales (now GB), Serbia (RS) and Montenegro (ME). Users based in Montenegro (ME) will need to manually update their profile.', 'notifysuccess');
$db->debug = true;
}
return $result;
}
+14
View File
@@ -1608,6 +1608,20 @@ function main_upgrade($oldversion=0) {
}
}
if ($result && $oldversion < 2006050561) {
$db->debug = false;
notify('Updating country list according to recent official ISO listing...', 'notifysuccess');
// re-assign users to valid countries
set_field('user', 'country', 'CD', 'country', 'ZR'); // Zaire is now Congo Democratique
set_field('user', 'country', 'TL', 'country', 'TP'); // Timor has changed
set_field('user', 'country', 'FR', 'country', 'FX'); // France metropolitaine doesn't exist
set_field('user', 'country', 'RS', 'country', 'KO'); // Kosovo is part of Serbia, "under the auspices of the United Nations, pursuant to UN Security Council Resolution 1244 of 10 June 1999."
set_field('user', 'country', 'GB', 'country', 'WA'); // Wales is part of UK (ie Great Britain)
set_field('user', 'country', 'RS', 'country', 'CS'); // Re-assign Serbia-Montenegro to Serbia. This is arbitrary, but there is no way to make an automatic decision on this.
notify('...update complete. Remember to update your language packs to get the most recent country names definitions and codes. This is especially important for sites with users from Congo (now CD), Timor (now TL), Kosovo (now RS), Wales (now GB), Serbia (RS) and Montenegro (ME). Users based in Montenegro (ME) will need to manually update their profile.', 'notifysuccess');
$db->debug = true;
}
return $result;
}
BIN
View File
Binary file not shown.
+5 -5
View File
@@ -344,8 +344,8 @@ class htmlarea extends editorObject {
echo "\n".'<script language="javascript" type="text/javascript">'."\n";
echo 'function openSpellChecker() {'."\n";
echo "\tvar speller = new spellChecker();\n";
echo "\tspeller.popUpUrl = \"" . $this->cfg->wwwroot ."/lib/speller/spellchecker.html\";\n";
echo "\tspeller.spellCheckScript = \"". $this->cfg->wwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
echo "\tspeller.popUpUrl = \"" . $this->cfg->httpswwwroot ."/lib/speller/spellchecker.html\";\n";
echo "\tspeller.spellCheckScript = \"". $this->cfg->httpswwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
echo "\tspeller.spellCheckAll();\n";
echo '}'."\n";
echo '</script>'."\n";
@@ -353,8 +353,8 @@ class htmlarea extends editorObject {
echo "\n\tfunction spellClickHandler(editor, buttonId) {\n";
echo "\t\teditor._textArea.value = editor.getHTML();\n";
echo "\t\tvar speller = new spellChecker( editor._textArea );\n";
echo "\t\tspeller.popUpUrl = \"" . $this->cfg->wwwroot ."/lib/speller/spellchecker.html\";\n";
echo "\t\tspeller.spellCheckScript = \"". $this->cfg->wwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
echo "\t\tspeller.popUpUrl = \"" . $this->cfg->httpswwwroot ."/lib/speller/spellchecker.html\";\n";
echo "\t\tspeller.spellCheckScript = \"". $this->cfg->httpswwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
echo "\t\tspeller._moogle_edit=1;\n";
echo "\t\tspeller._editor=editor;\n";
echo "\t\tspeller.openChecker();\n\t";
@@ -363,4 +363,4 @@ class htmlarea extends editorObject {
}
}
?>
?>
-93
View File
@@ -1,93 +0,0 @@
<?php
require_once('HTML/QuickForm/advcheckbox.php');
/**
* HTML class for a advcheckbox type element
*
* default behavior special for Moodle is to return '0' if not checked
* '1' for checked.
*
* * @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_advcheckbox extends HTML_QuickForm_advcheckbox{
/**
* html for help button, if empty then no help
*
* @var string
*/
var $_helpbutton='';
/**
* Class constructor
*
* @param string $elementName (optional)Input field name attribute
* @param string $elementLabel (optional)Input field label
* @param string $text (optional)Text to put after the checkbox
* @param mixed $attributes (optional)Either a typical HTML attribute string
* or an associative array
* @param mixed $values (optional)Values to pass if checked or not checked
*
* @since 1.0
* @access public
* @return void
*/
function MoodleQuickForm_advcheckbox($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null)
{
if ($values === null){
$values = array(0, 1);
}
parent::HTML_QuickForm_advcheckbox($elementName, $elementLabel, $text, $attributes, $values);
} //end constructor
/**
* set html for help button
*
* @access public
* @param array $help array of arguments to make a help button
* @param string $function function name to call to get html
*/
function setHelpButton($helpbuttonargs, $function='helpbutton'){
if (!is_array($helpbuttonargs)){
$helpbuttonargs=array($helpbuttonargs);
}else{
$helpbuttonargs=$helpbuttonargs;
}
//we do this to to return html instead of printing it
//without having to specify it in every call to make a button.
if ('helpbutton' == $function){
$defaultargs=array('', '', 'moodle', true, false, '', true);
$helpbuttonargs=$helpbuttonargs + $defaultargs ;
}
$this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
/**
* get html for help button
*
* @access public
* @return string html for help button
*/
function getHelpButton(){
return $this->_helpbutton;
}
/**
* Automatically generates and assigns an 'id' attribute for the element.
*
* Currently used to ensure that labels work on radio buttons and
* advcheckboxes. Per idea of Alexander Radivanovich.
* Overriden in moodleforms to remove qf_ prefix.
*
* @access private
* @return void
*/
function _generateId()
{
static $idx = 1;
if (!$this->getAttribute('id')) {
$this->updateAttributes(array('id' => 'id_'.substr(md5(microtime() . $idx++), 0, 6)));
}
} // end func _generateId
}
?>
-72
View File
@@ -1,72 +0,0 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 4.0 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Adam Daniel <adaniel1@eesus.jnj.com> |
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
// $Id$
require_once("HTML/QuickForm/button.php");
/**
* HTML class for a button type element
*
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @version 1.1
* @since PHP4.04pl1
* @access public
*/
class MoodleQuickForm_button extends HTML_QuickForm_button
{
/**
* html for help button, if empty then no help
*
* @var string
*/
var $_helpbutton='';
/**
* set html for help button
*
* @access public
* @param array $help array of arguments to make a help button
* @param string $function function name to call to get html
*/
function setHelpButton($helpbuttonargs, $function='helpbutton'){
if (!is_array($helpbuttonargs)){
$helpbuttonargs=array($helpbuttonargs);
}else{
$helpbuttonargs=$helpbuttonargs;
}
//we do this to to return html instead of printing it
//without having to specify it in every call to make a button.
if ('helpbutton' == $function){
$defaultargs=array('', '', 'moodle', true, false, '', true);
$helpbuttonargs=$helpbuttonargs + $defaultargs ;
}
$this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
/**
* get html for help button
*
* @access public
* @return string html for help button
*/
function getHelpButton(){
return $this->_helpbutton;
}
} //end class MoodleQuickForm_button
?>
-47
View File
@@ -1,47 +0,0 @@
<?php
require_once('HTML/QuickForm/submit.php');
/**
* HTML class for a submit type element
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_cancel extends MoodleQuickForm_submit
{
// {{{ constructor
/**
* Class constructor
*
* @since 1.0
* @access public
* @return void
*/
function MoodleQuickForm_cancel($elementName=null, $value=null, $attributes=null)
{
if ($elementName==null){
$elementName='cancel';
}
if ($value==null){
$value=get_string('cancel');
}
MoodleQuickForm_submit::MoodleQuickForm_submit($elementName, $value, $attributes);
$this->updateAttributes(array('onclick'=>'skipClientValidation = true; return true;'));
} //end constructor
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'createElement':
$className = get_class($this);
$this->$className($arg[0], $arg[1], $arg[2]);
$caller->_registerCancelButton($this->getName());
return true;
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
} // end func onQuickFormEvent
// }}}
} //end class MoodleQuickForm_cancel
?>
-147
View File
@@ -1,147 +0,0 @@
<?php //$Id$
global $CFG;
require_once "$CFG->libdir/form/group.php";
/**
* Class for an element used to choose a file from the course files folder.
*
*
* @author Jamie Pratt <me@jamiep.org>
* @access public
*/
class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group
{
/**
* Options for element :
*
* $url must be relative to home page eg /mod/survey/stuff.php
* courseid => int course id if null then uses $COURSE global
* width => int Height to assign to popup window
* title => string Text to be displayed as popup page title
* options => string List of additional options for popup window
*/
var $_options = array('courseid'=>null,
'height'=>500, 'width'=>750, 'options'=>'none');
/**
* These complement separators, they are appended to the resultant HTML
* @access private
* @var array
*/
var $_wrap = array('', '');
/**
* Class constructor
*
* @access public
* @param string Element's name
* @param mixed Label(s) for an element
* @param array Options to control the element's display
* @param mixed Either a typical HTML attribute string or an associative array
*/
function MoodleQuickForm_choosecoursefile($elementName = null, $elementLabel = null, $options = array(), $attributes = null)
{
$this->HTML_QuickForm_element($elementName, $elementLabel, $attributes);
$this->_appendName = true;
$this->_type = 'choosecoursefile';
// set the options, do not bother setting bogus ones
if (is_array($options)) {
foreach ($options as $name => $value) {
if (isset($this->_options[$name])) {
if (is_array($value) && is_array($this->_options[$name])) {
$this->_options[$name] = @array_merge($this->_options[$name], $value);
} else {
$this->_options[$name] = $value;
}
}
}
}
}
// }}}
// {{{ _createElements()
function _createElements() {
global $COURSE;
$this->_elements = array();
$this->_elements[0] =& MoodleQuickForm::createElement('text', 'value', '', array('size'=>'48'));
$this->_elements[1] =& MoodleQuickForm::createElement('button', 'popup', get_string('chooseafile', 'resource') .' ...');
$button =& $this->_elements[1];
if ($this->_options['courseid']!==null){
$courseid=$this->_options['courseid'];
} else {
$courseid=$COURSE->id;
}
// first find out the text field id - this is a bit hacky, is there a better way?
$choose = 'id_'.str_replace(array('[', ']'), array('_', ''), $this->getElementName(0));
$url="/files/index.php?id=$courseid&choose=".$choose;
if ($this->_options['options'] == 'none') {
$options = 'menubar=0,location=0,scrollbars,resizable,width='. $this->_options['width'] .',height='. $this->_options['height'];
}else{
$options = $this->_options['options'];
}
$fullscreen = 0;
$buttonattributes = array('title'=>get_string("chooseafile", "resource"),
'onclick'=>"return openpopup('$url', '".$button->getName()."', '$options', $fullscreen);");
$button->updateAttributes($buttonattributes);
}
/**
* Output a timestamp. Give it the name of the group.
*
* @param array $submitValues
* @param bool $assoc
* @return array
*/
function exportValue(&$submitValues, $assoc = false)
{
$value = null;
$valuearray = $this->_elements[0]->exportValue($submitValues[$this->getName()], true);
$value[$this->getName()]=$valuearray['value'];
return $value;
}
// }}}
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return void
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'updateValue':
// constant values override both default and submitted ones
// default values are overriden by submitted
$value = $this->_findValue($caller->_constantValues);
if (null === $value) {
$value = $this->_findValue($caller->_submitValues);
if (null === $value) {
$value = $this->_findValue($caller->_defaultValues);
}
}
if (!is_array($value)) {
$value = array('value' => $value);
}
if (null !== $value) {
$this->setValue($value);
}
return true;
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
} // end func onQuickFormEvent
}
?>
-231
View File
@@ -1,231 +0,0 @@
<?php
global $CFG;
require_once "$CFG->libdir/form/group.php";
require_once "$CFG->libdir/formslib.php";
/**
* Class for a group of elements used to input a date and time.
*
* Emulates moodle print_date_selector function and also allows you to select a time.
*
* @author Jamie Pratt <me@jamiep.org>
* @access public
*/
class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
/**
* Options for the element
*
* startyear => integer start of range of years that can be selected
* stopyear => integer last year that can be selected
* timezone => float/string timezone
* applydst => apply users daylight savings adjustment?
* step => step to increment minutes by
*/
var $_options = array('startyear'=>1970, 'stopyear'=>2020,
'timezone'=>99, 'applydst'=>true, 'step'=>5, 'optional'=>false);
/**
* These complement separators, they are appended to the resultant HTML
* @access private
* @var array
*/
var $_wrap = array('', '');
/**
* Class constructor
*
* @access public
* @param string Element's name
* @param mixed Label(s) for an element
* @param array Options to control the element's display
* @param mixed Either a typical HTML attribute string or an associative array
*/
function MoodleQuickForm_date_time_selector($elementName = null, $elementLabel = null, $options = array(), $attributes = null)
{
$this->HTML_QuickForm_element($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_appendName = true;
$this->_type = 'date_time_selector';
// set the options, do not bother setting bogus ones
if (is_array($options)) {
foreach ($options as $name => $value) {
if (isset($this->_options[$name])) {
if (is_array($value) && is_array($this->_options[$name])) {
$this->_options[$name] = @array_merge($this->_options[$name], $value);
} else {
$this->_options[$name] = $value;
}
}
}
}
}
// }}}
// {{{ _createElements()
function _createElements()
{
$this->_elements = array();
for ($i=1; $i<=31; $i++) {
$days[$i] = $i;
}
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12,0,0,$i,1,2000), "%B");
}
for ($i=$this->_options['startyear']; $i<=$this->_options['stopyear']; $i++) {
$years[$i] = $i;
}
for ($i=0; $i<=23; $i++) {
$hours[$i] = sprintf("%02d",$i);
}
for ($i=0; $i<60; $i+=$this->_options['step']) {
$minutes[$i] = sprintf("%02d",$i);
}
$this->_elements[] =& MoodleQuickForm::createElement('select', 'day', get_string('day', 'form'), $days, $this->getAttributes(), true);
$this->_elements[] =& MoodleQuickForm::createElement('select', 'month', get_string('month', 'form'), $months, $this->getAttributes(), true);
$this->_elements[] =& MoodleQuickForm::createElement('select', 'year', get_string('year', 'form'), $years, $this->getAttributes(), true);
$this->_elements[] =& MoodleQuickForm::createElement('select', 'hour', get_string('hour', 'form'), $hours, $this->getAttributes(), true);
$this->_elements[] =& MoodleQuickForm::createElement('select', 'minute', get_string('minute', 'form'), $minutes, $this->getAttributes(), true);
// If optional we add a checkbox which the user can use to turn if on
if($this->_options['optional']) {
$this->_elements[] =& MoodleQuickForm::createElement('checkbox', 'off', null, get_string('disable'), $this->getAttributes(), true);
}
foreach ($this->_elements as $element){
if (method_exists($element, 'setHiddenLabel')){
$element->setHiddenLabel(true);
}
}
}
// }}}
// {{{ onQuickFormEvent()
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return void
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'updateValue':
// constant values override both default and submitted ones
// default values are overriden by submitted
$value = $this->_findValue($caller->_constantValues);
if (null === $value) {
// if no boxes were checked, then there is no value in the array
// yet we don't want to display default value in this case
if ($caller->isSubmitted()) {
$value = $this->_findValue($caller->_submitValues);
} else {
$value = $this->_findValue($caller->_defaultValues);
}
}
$requestvalue=$value;
if ($value == 0) {
$value = time();
}
if (!is_array($value)) {
$currentdate = usergetdate($value);
$value = array(
'minute' => $currentdate['minutes'],
'hour' => $currentdate['hours'],
'day' => $currentdate['mday'],
'month' => $currentdate['mon'],
'year' => $currentdate['year']);
// If optional, default to off, unless a date was provided
if($this->_options['optional']) {
$value['off'] = ($requestvalue == 0) ? true : false;
}
} else {
$value['off'] = (isset($value['off'])) ? true : false;
}
if (null !== $value){
$this->setValue($value);
}
break;
case 'createElement':
if($arg[2]['optional']) {
$caller->disabledIf($arg[0], $arg[0].'[off]', 'checked');
}
return parent::onQuickFormEvent($event, $arg, $caller);
break;
default:
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
// }}}
// {{{ toHtml()
function toHtml()
{
include_once('HTML/QuickForm/Renderer/Default.php');
$renderer =& new HTML_QuickForm_Renderer_Default();
$renderer->setElementTemplate('{element}');
parent::accept($renderer);
return $this->_wrap[0] . $renderer->toHtml() . $this->_wrap[1];
}
// }}}
// {{{ accept()
function accept(&$renderer, $required = false, $error = null)
{
$renderer->renderElement($this, $required, $error);
}
// }}}
/**
* Output a timestamp. Give it the name of the group.
*
* @param array $submitValues
* @param bool $assoc
* @return array
*/
function exportValue(&$submitValues, $assoc = false)
{
$value = null;
$valuearray = array();
foreach ($this->_elements as $element){
$thisexport = $element->exportValue($submitValues[$this->getName()], true);
if ($thisexport!=null){
$valuearray += $thisexport;
}
}
if (count($valuearray)){
if($this->_options['optional']) {
// If checkbox is on, the value is zero, so go no further
if(!empty($valuearray['off'])) {
$value[$this->getName()]=0;
return $value;
}
}
$valuearray=$valuearray + array('year'=>1970, 'month'=>1, 'day'=>1, 'hour'=>0, 'minute'=>0);
$value[$this->getName()]=make_timestamp(
$valuearray['year'],
$valuearray['month'],
$valuearray['day'],
$valuearray['hour'],
$valuearray['minute'],
0,
$this->_options['timezone'],
$this->_options['applydst']);
return $value;
} else {
return null;
}
}
// }}}
}
?>
-74
View File
@@ -1,74 +0,0 @@
<?php
require_once('../../config.php');
$topics = array();
$titles = array();
for ($i=1; ; $i++){
$button = optional_param("button$i", '', PARAM_ALPHAEXT);
if ($button){
switch ($button){
case 'reading' :
$topics[$i] = helplink('reading', get_string('helpreading'), 'moodle', false, true);
break;
case 'writing' :
$topics[$i] = helplink('writing', get_string('helpwriting'));
break;
case 'questions' :
$topics[$i] = helplink('questions', get_string('helpquestions'));
break;
case 'emoticons' :
$topics[$i] = helplink('emoticons', get_string('helpemoticons'));
break;
case 'richtext' :
$topics[$i] = helplink('richtext', get_string('helprichtext'));
break;
case 'text' :
$topics[$i] = helplink('text', get_string('helptext'));
break;
default :
error('Unknown help topic '.$item);
}
} else {
$keyword = optional_param("keyword$i", '', PARAM_ALPHAEXT);
if ('' == $keyword) {
break;//exit for loop - no more help items
}
$title = optional_param("title$i", '', PARAM_NOTAGS);
$module = optional_param("module$i", 'moodle', PARAM_ALPHAEXT);
$func[$i] = 'helpbutton';
$topics[$i] = helplink($keyword, $title, $module);
}
}
print_header();
print_simple_box_start('center', '96%');
print_heading(get_string('editorhelptopics'));
echo '<ul>';
foreach ($topics as $i => $topic){
echo('<li>'.$topics[$i].'</li>');
}
echo '</ul>';
print_simple_box_end();
// End of page.
close_window_button();
echo '<p align="center"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
$CFG->docroot = ''; // We don't want a doc link here
print_footer('none');
die;
/**
* A function to return a simple link to a help page. We don't want a popup here
* since these links are displayed in a pop up already.
*
* @param string $page
* @param string $linktext
* @param string $module
* @return string
*/
function helplink($page, $linktext='', $module='moodle'){
global $CFG;
return "<a href=\"$CFG->wwwroot/help.php?module=$module&amp;file=$page.html\">$linktext</a>";
}
?>
-98
View File
@@ -1,98 +0,0 @@
<?php
global $CFG;
require_once "$CFG->libdir/form/select.php";
/**
* HTML class for a editor format drop down element
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_format extends MoodleQuickForm_select{
/**
* Whether we are using html editor.
*
* @var unknown_type
*/
var $_useHtmlEditor;
/**
* Class constructor
*
* @param string Select name attribute
* @param mixed Label(s) for the select
* @param mixed Either a typical HTML attribute string or an associative array
* @param mixed Either a string returned from can_use_html_editor() or false for no html editor
* default 'detect' tells element to use html editor if it is available.
* @access public
* @return void
*/
function MoodleQuickForm_format($elementName=null, $elementLabel=null, $attributes=null, $useHtmlEditor=null)
{
if ($elementName == null){
$elementName = 'format';
}
if ($elementLabel == null){
$elementLabel = get_string('format');
}
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
$this->_type = 'format';
$this->_useHtmlEditor=$useHtmlEditor;
if ($this->_useHtmlEditor === null){
$this->_useHtmlEditor=can_use_html_editor();
}
$this->setPersistantFreeze($this->_useHtmlEditor);
if ($this->_useHtmlEditor){
$this->freeze();
} else {
$this->unfreeze();
}
} //end constructor
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return mixed
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'createElement':
$this->load(format_text_menu());
$this->setHelpButton(array('textformat', get_string('helpformatting')));
break;
case 'updateValue' :
$value = $this->_findValue($caller->_constantValues);
if (null === $value) {
$value = $this->_findValue($caller->_submitValues);
// Fix for bug #4465 & #5269
// XXX: should we push this to element::onQuickFormEvent()?
if (null === $value && (!$caller->isSubmitted() || !$this->getMultiple())) {
$value = $this->_findValue($caller->_defaultValues);
}
}
if (null !== $value) {
$format=$value;
}else{
$format=FORMAT_MOODLE;
}
if ($this->_useHtmlEditor){
$this->setValue(array(FORMAT_HTML));
}else{
$this->setValue(array($format));
}
return true;
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
?>
-66
View File
@@ -1,66 +0,0 @@
<?php
// $Id$
require_once 'HTML/QuickForm/header.php';
/**
* A pseudo-element used for adding headers to form
*
*/
class MoodleQuickForm_header extends HTML_QuickForm_header
{
/**
* html for help button, if empty then no help
*
* @var string
*/
var $_helpbutton='';
// {{{ accept()
/**
* Accepts a renderer
*
* @param object An HTML_QuickForm_Renderer object
* @access public
* @return void
*/
function accept(&$renderer)
{
$this->_text .= $this->getHelpButton();
$renderer->renderHeader($this);
} // end func accept
// }}}
/**
* set html for help button
*
* @access public
* @param array $help array of arguments to make a help button
* @param string $function function name to call to get html
*/
function setHelpButton($helpbuttonargs, $function='helpbutton'){
if (!is_array($helpbuttonargs)){
$helpbuttonargs=array($helpbuttonargs);
}else{
$helpbuttonargs=$helpbuttonargs;
}
//we do this to to return html instead of printing it
//without having to specify it in every call to make a button.
if ('helpbutton' == $function){
$defaultargs=array('', '', 'moodle', true, false, '', true);
$helpbuttonargs=$helpbuttonargs + $defaultargs ;
}
$this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
/**
* get html for help button
*
* @access public
* @return string html for help button
*/
function getHelpButton(){
return $this->_helpbutton;
}
} //end class MoodleQuickForm_header
?>
-71
View File
@@ -1,71 +0,0 @@
<?php
global $CFG;
require_once "$CFG->libdir/form/select.php";
/**
* HTML class for a drop down element to select the grade for an activity,
* used in mod update form
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_modgrade extends MoodleQuickForm_select{
var $_includenograde=true;
/**
* Class constructor
*
* @param string Select name attribute
* @param mixed Label(s) for the select
* @param mixed Either a typical HTML attribute string or an associative array
* @param mixed $options ignored
* @access public
* @return void
*/
function MoodleQuickForm_modgrade($elementName=null, $elementLabel=null, $attributes=null, $includenograde=true)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
$this->_type = 'modgrade';
$this->_includenograde=$includenograde;
} //end constructor
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return mixed
*/
function onQuickFormEvent($event, $arg, &$caller)
{
global $COURSE, $CFG;
switch ($event) {
case 'createElement':
$strscale = get_string('scale');
$strscales = get_string('scales');
$scales = get_scales_menu($COURSE->id);
foreach ($scales as $i => $scalename) {
$grades[-$i] = $strscale .': '. $scalename;
}
if ($this->_includenograde) {
$grades[0] = get_string('nograde');
}
for ($i=100; $i>=1; $i--) {
$grades[$i] = $i;
}
$this->load($grades);
$linkobject = '<span class="helplink"><img height="17" width="17" alt="'.$strscales.'" src="'.$CFG->pixpath .'/help.gif" /></span>';
$this->setHelpButton(array('/course/scales.php?id='. $COURSE->id .'&amp;list=true', 'ratingscales',
$linkobject, 400, 500, $strscales, 'none', true), 'link_to_popup_window');
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
?>
-58
View File
@@ -1,58 +0,0 @@
<?php
global $CFG;
require_once "$CFG->libdir/form/select.php";
/**
* HTML class for a drop down element to select groupmode in an activity mod update form
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_modgroupmode extends MoodleQuickForm_select{
/**
* Class constructor
*
* @param string Select name attribute
* @param mixed Label(s) for the select
* @param mixed Either a typical HTML attribute string or an associative array
* @param mixed $options ignored
* @access public
* @return void
*/
function MoodleQuickForm_modgroupmode($elementName=null, $elementLabel=null, $attributes=null, $options=null)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
$this->_type = 'modgroupmode';
} //end constructor
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return mixed
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'createElement':
$choices = array();
$choices[NOGROUPS] = get_string('groupsnone');
$choices[SEPARATEGROUPS] = get_string('groupsseparate');
$choices[VISIBLEGROUPS] = get_string('groupsvisible');
$this->setHelpButton(array('groupmode', get_string('groupmode')));
$this->load($choices);
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
?>
-54
View File
@@ -1,54 +0,0 @@
<?php
global $CFG;
require_once "$CFG->libdir/form/select.php";
/**
* HTML class for a drop down element to select visibility in an activity mod update form
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_modvisible extends MoodleQuickForm_select{
/**
* Class constructor
*
* @param string $elementName Select name attribute
* @param mixed $elementLabel Label(s) for the select
* @param mixed $attributes Either a typical HTML attribute string or an associative array
* @param array $options ignored
* @access public
* @return void
*/
function MoodleQuickForm_modvisible($elementName=null, $elementLabel=null, $attributes=null, $options=null)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
$this->_type = 'modvisible';
} //end constructor
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @access public
* @return mixed
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'createElement':
$choices=array();
$choices[1] = get_string('show');
$choices[0] = get_string('hide');
$this->load($choices);
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
?>
-72
View File
@@ -1,72 +0,0 @@
<?php
/**
* A moodle form field type for question categories.
*
* @copyright &copy; 2006 The Open University
* @author T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package moodleforms
*//** */
global $CFG;
require_once("$CFG->libdir/form/select.php");
/**
* HTML class for a drop down element to select a question category.
* @access public
*/
class MoodleQuickForm_questioncategory extends MoodleQuickForm_select {
/**
* Constructor
*
* @param string $elementName Select name attribute
* @param mixed $elementLabel Label(s) for the select
* @param mixed $attributes Either a typical HTML attribute string or an associative array
* @param array $options additional options. Recognised options are courseid, published and
* only_editable, corresponding to the arguments of question_category_options from moodlelib.php.
* @access public
* @return void
*/
function MoodleQuickForm_questioncategory($elementName = null,
$elementLabel = null, $attributes = null, $options = null) {
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
global $COURSE;
$this->_type = 'questioncategory';
if (!empty($options['courseid'])) {
$this->_courseid = $options['courseid'];
} else {
$this->_courseid = $COURSE->id;
}
if (!empty($options['published'])) {
$this->_published = $options['published'];
} else {
$this->_published = false;
}
if (!empty($options['only_editable'])) {
$this->_only_editable = $options['only_editable'];
} else {
$this->_only_editable = false;
}
}
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @access public
* @return mixed
*/
function onQuickFormEvent($event, $arg, &$caller) {
switch ($event) {
case 'createElement':
$this->load(question_category_options($this->_courseid, $this->_published, $this->_only_editable));
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
?>
-55
View File
@@ -1,55 +0,0 @@
<?php
global $CFG;
require_once "$CFG->libdir/form/select.php";
/**
* HTML class for a simple yes/ no drop down element
*
* @author Jamie Pratt
* @access public
*/
class MoodleQuickForm_selectyesno extends MoodleQuickForm_select{
/**
* Class constructor
*
* @param string Select name attribute
* @param mixed Label(s) for the select
* @param mixed Either a typical HTML attribute string or an associative array
* @param mixed $options ignored
* @access public
* @return void
*/
function MoodleQuickForm_selectyesno($elementName=null, $elementLabel=null, $attributes=null, $options=null)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
$this->_type = 'selectyesno';
} //end constructor
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return mixed
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'createElement':
$choices=array();
$choices[0] = get_string('no');
$choices[1] = get_string('yes');
$this->load($choices);
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
}
}
?>
-45
View File
@@ -1,45 +0,0 @@
<?php
require_once("HTML/QuickForm/submit.php");
/**
* HTML class for a submit type element
*
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @version 1.0
* @since PHP4.04pl1
* @access public
*/
class MoodleQuickForm_submit extends HTML_QuickForm_submit {
/**
* Called by HTML_QuickForm whenever form event is made on this element
*
* @param string $event Name of event
* @param mixed $arg event arguments
* @param object $caller calling object
* @since 1.0
* @access public
* @return void
*/
function onQuickFormEvent($event, $arg, &$caller)
{
switch ($event) {
case 'createElement':
parent::onQuickFormEvent($event, $arg, $caller);
if ($caller->isNoSubmitButton($arg[0])){
//need this to bypass client validation
//for buttons that submit but do not process the
//whole form.
$onClick = $this->getAttribute('onclick');
$skip = 'skipClientValidation = true;';
$onClick = ($onClick !== null)?$skip.' '.$onClick:$skip;
$this->updateAttributes(array('onclick'=>$onClick));
}
return true;
break;
}
return parent::onQuickFormEvent($event, $arg, $caller);
} // end func onQuickFormEvent
}
?>
+6 -4
View File
@@ -469,10 +469,12 @@ function kses_bad_protocol_once($string, $allowed_protocols)
# handling whitespace and HTML entities.
###############################################################################
{
return preg_replace('/^((&[^;]*;|[\sA-Za-z0-9])*)'.
'(:|&#0*58;|&#[Xx]0*3[Aa];)\s*/e',
'kses_bad_protocol_once2("\\1", $allowed_protocols)',
$string);
$string2 = preg_split('/:|&#58;|&#x3a;/i', $string, 2);
if(isset($string2[1]) && !preg_match('%/\?%',$string2[0]))
{
$string = kses_bad_protocol_once2($string2[0],$allowed_protocols).trim($string2[1]);
}
return $string;
} # function kses_bad_protocol_once
+9 -5
View File
@@ -174,19 +174,23 @@ class cmoptions {
* @return array of strings
*/
function question_list_instances($questionid) {
global $CFG;
$instances = array();
$modules = get_records('modules');
foreach ($modules as $module) {
$fn = $module->name.'_question_list_instances';
if (function_exists($fn)) {
$instances = $instances + $fn($questionid);
$fullmod = $CFG->dirroot . '/mod/' . $module->name;
if (file_exists($fullmod . '/lib.php')) {
include_once($fullmod . '/lib.php');
$fn = $module->name.'_question_list_instances';
if (function_exists($fn)) {
$instances = $instances + $fn($questionid);
}
}
}
return $instances;
}
/**
/**
* Returns list of 'allowed' grades for grade selection
* formatted suitably for dropdown box function
* @return object ->gradeoptionsfull full array ->gradeoptions +ve only
+3 -3
View File
@@ -4,8 +4,8 @@ function speller_enable (&$CFG) {
echo "function spellClickHandler(editor, buttonId) {\n";
echo "\teditor._textArea.value = editor.getHTML();\n";
echo "\tvar speller = new spellChecker( editor._textArea );\n";
echo "\tspeller.popUpUrl = \"" . $CFG->wwwroot ."/lib/speller/spellchecker.html\";\n";
echo "\tspeller.spellCheckScript = \"". $CFG->wwwroot ."/lib/speller/server-scripts/spellchecker.php?id=$courseid\";\n";
echo "\tspeller.popUpUrl = \"" . $CFG->httpswwwroot ."/lib/speller/spellchecker.html\";\n";
echo "\tspeller.spellCheckScript = \"". $CFG->httpswwwroot ."/lib/speller/server-scripts/spellchecker.php?id=$courseid\";\n";
echo "\tspeller._moogle_edit=1;\n";
echo "\tspeller._editor=editor;\n";
echo "\tspeller.openChecker();\n";
@@ -14,4 +14,4 @@ function speller_enable (&$CFG) {
echo "config.toolbar.push([\"spell-check\"]);\n";
}
?>
?>
+1 -1
View File
@@ -297,7 +297,7 @@ class flexible_table {
$querystring .= '&amp;';
}
else {
$this->reseturl = $strippedurl.$querystring;
$this->reseturl = $strippedurl;
$querystring = '?';
}
+5 -4
View File
@@ -1600,6 +1600,7 @@ function cleanAttributes2($htmlArray){
}
$arreach['value'] = preg_replace("/j\s*a\s*v\s*a\s*s\s*c\s*r\s*i\s*p\s*t/i", "Xjavascript", $arreach['value']);
$arreach['value'] = preg_replace("/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n/i", "Xexpression", $arreach['value']);
$arreach['value'] = preg_replace("/b\s*i\s*n\s*d\s*i\s*n\s*g/i", "Xbinding", $arreach['value']);
} else if ($arreach['name'] == 'href') {
//Adobe Acrobat Reader XSS protection
$arreach['value'] = preg_replace('/(\.(pdf|fdf|xfdf|xdp|xfd))[^a-z0-9_\.\-].*$/i', '$1', $arreach['value']);
@@ -4654,8 +4655,8 @@ function print_speller_code ($usehtmleditor=false, $return=false) {
$str .= "\n".'<script language="javascript" type="text/javascript">'."\n";
$str .= 'function openSpellChecker() {'."\n";
$str .= "\tvar speller = new spellChecker();\n";
$str .= "\tspeller.popUpUrl = \"" . $CFG->wwwroot ."/lib/speller/spellchecker.html\";\n";
$str .= "\tspeller.spellCheckScript = \"". $CFG->wwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
$str .= "\tspeller.popUpUrl = \"" . $CFG->httpswwwroot ."/lib/speller/spellchecker.html\";\n";
$str .= "\tspeller.spellCheckScript = \"". $CFG->httpswwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
$str .= "\tspeller.spellCheckAll();\n";
$str .= '}'."\n";
$str .= '</script>'."\n";
@@ -4663,8 +4664,8 @@ function print_speller_code ($usehtmleditor=false, $return=false) {
$str .= "\nfunction spellClickHandler(editor, buttonId) {\n";
$str .= "\teditor._textArea.value = editor.getHTML();\n";
$str .= "\tvar speller = new spellChecker( editor._textArea );\n";
$str .= "\tspeller.popUpUrl = \"" . $CFG->wwwroot ."/lib/speller/spellchecker.html\";\n";
$str .= "\tspeller.spellCheckScript = \"". $CFG->wwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
$str .= "\tspeller.popUpUrl = \"" . $CFG->httpswwwroot ."/lib/speller/spellchecker.html\";\n";
$str .= "\tspeller.spellCheckScript = \"". $CFG->httpswwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
$str .= "\tspeller._moogle_edit=1;\n";
$str .= "\tspeller._editor=editor;\n";
$str .= "\tspeller.openChecker();\n";
+1
View File
@@ -1000,6 +1000,7 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp
$tagline = get_string('emailtagline', 'message', $SITE->shortname);
$messagesubject = message_shorten_message(strip_tags($message), 30).'...';
$messagesubject = str_replace("\n", ' ', $messagesubject); // make sure it's all on one line
$messagetext = format_text_email($message, $format).
"\n\n--\n".$tagline."\n"."$CFG->wwwroot/message/index.php?popup=1";
+18 -11
View File
@@ -1520,8 +1520,8 @@ class hotpot_xml_quiz extends hotpot_xml_tree {
// relative URLs in stylesheets
$search = '|'.'(<style[^>]*>)'.'(.*?)'.'(</style>)'.'|ise';
$replace = "stripslashes('\\1').hotpot_convert_stylesheets_urls('".$this->get_baseurl()."','".$this->reference."','\\2'.'\\3')";
$this->source = preg_replace($search, $replace, $this->source);
$replace = "hotpot_stripslashes('\\1').hotpot_convert_stylesheets_urls('".$this->get_baseurl()."','".$this->reference."','\\2'.'\\3')";
$this->source = preg_replace($search, $replace, $this->source);
// relative URLs in "PreloadImages(...);"
$search = '|'.'(?<='.'PreloadImages'.'\('.')'."([^)]+?)".'(?='.'\);'.')'.'|se';
@@ -1775,9 +1775,16 @@ class hotpot_xml_quiz extends hotpot_xml_tree {
} // end class
function hotpot_stripslashes($str) {
// strip slashes from double quotes, single quotes and back slashes
// the slashes were added by preg_replace() when using the "e" modifier
static $escapedchars = array('\\\\', '\\"', "\\'");
static $unescapedchars = array('\\', '"', "'");
return str_replace($escapedchars, $unescapedchars, $str);
}
function hotpot_convert_stylesheets_urls($baseurl, $reference, $css, $stripslashes=true) {
if ($stripslashes) {
$css = stripslashes($css);
$css = hotpot_stripslashes($css);
}
$search = '|'.'(?<='.'url'.'\('.')'."(.+?)".'(?='.'\)'.')'.'|ise';
$replace = "hotpot_convert_url('".$baseurl."','".$reference."','\\1')";
@@ -1785,7 +1792,7 @@ function hotpot_convert_stylesheets_urls($baseurl, $reference, $css, $stripslash
}
function hotpot_convert_preloadimages_urls($baseurl, $reference, $urls, $stripslashes=true) {
if ($stripslashes) {
$urls = stripslashes($urls);
$urls = hotpot_stripslashes($urls);
}
$search = '|(?<=["'."'])([^,'".'"]*?)(?=["'."'])|ise";
$replace = "hotpot_convert_url('".$baseurl."','".$reference."','\\1')";
@@ -1795,12 +1802,12 @@ function hotpot_convert_navbutton_url($baseurl, $reference, $url, $course, $stri
global $CFG;
if ($stripslashes) {
$url = stripslashes($url);
$url = hotpot_stripslashes($url);
}
$url = hotpot_convert_url($baseurl, $reference, $url, false);
// is this a $url for another hotpot in this course ?
if (preg_match("|^$baseurl(.*)$|", $url, $matches)) {
if (preg_match("|^".preg_quote($baseurl)."(.*)$|", $url, $matches)) {
if ($records = get_records_select('hotpot', "course='$course' AND reference='".$matches[1]."'")) {
$ids = array_keys($records);
$url = "$CFG->wwwroot/mod/hotpot/view.php?hp=".$ids[0];
@@ -1812,9 +1819,9 @@ function hotpot_convert_navbutton_url($baseurl, $reference, $url, $course, $stri
function hotpot_convert_relative_url($baseurl, $reference, $opentag, $url, $closetag, $stripslashes=true) {
if ($stripslashes) {
$opentag = stripslashes($opentag);
$url = stripslashes($url);
$closetag = stripslashes($closetag);
$opentag = hotpot_stripslashes($opentag);
$url = hotpot_stripslashes($url);
$closetag = hotpot_stripslashes($closetag);
}
// catch <PARAM name="FlashVars" value="TheSound=soundfile.mp3">
@@ -1844,7 +1851,7 @@ function hotpot_convert_relative_url($baseurl, $reference, $opentag, $url, $clos
}
if ($query) {
$search = '#'.'(file|src|thesound)='."([^&]+)".'#ise';
$search = '#'.'(file|src|thesound|mp3)='."([^&]+)".'#ise';
$replace = "'\\1='.hotpot_convert_url('".$baseurl."','".$reference."','\\2')";
$query = preg_replace($search, $replace, $query);
}
@@ -1859,7 +1866,7 @@ function hotpot_convert_url($baseurl, $reference, $url, $stripslashes=true) {
static $HOTPOT_RELATIVE_URLS = array();
if ($stripslashes) {
$url = stripslashes($url);
$url = hotpot_stripslashes($url);
}
// is this an absolute url? (or javascript pseudo url)
+1 -7
View File
@@ -33,7 +33,7 @@ $text_source_options = array(
print '<input type="hidden" name="namesource" value="'.HOTPOT_TEXTSOURCE_SPECIFIC.'">';
}
print '<span id="nameSPAN">';
print '<input type="text" name="name" size=40 value="'.$form->name.'">';
print '<input type="text" name="name" size="40" value="'.htmlspecialchars($form->name).'" />';
print '</span>';
?></td>
</tr>
@@ -84,9 +84,6 @@ $text_source_options = array(
choose_from_menu($options, "enabletimeopen", "$form->enabletimeopen", "");
print '<span id="timeopenSPAN">';
print ' &nbsp; ';
if (!$form->timeopen && $course->format == "weeks") {
$form->timeopen= $course->startdate + (($form->section - 1) * 608400);
}
print_date_selector("openday", "openmonth", "openyear", $form->timeopen);
print ' - ';
print_time_selector("openhour", "openminute", $form->timeopen);
@@ -104,9 +101,6 @@ $text_source_options = array(
choose_from_menu($options, "enabletimeclose", "$form->enabletimeclose", "");
print '<span id="timecloseSPAN">';
print ' &nbsp; ';
if (!$form->timeclose && $course->format == "weeks") {
$form->timeclose= $course->startdate + (($form->section) * 608400);
}
print_date_selector("closeday", "closemonth", "closeyear", $form->timeclose);
print ' - ';
print_time_selector("closehour", "closeminute", $form->timeclose);
+8 -4
View File
@@ -377,10 +377,14 @@ function hotpot_delete_selected_attempts(&$hotpot, $del) {
$select = "hotpot='$hotpot->id' AND status=".HOTPOT_STATUS_ABANDONED;
break;
case 'selection':
$ids = (array)data_submitted();
unset($ids['del']);
unset($ids['id']);
if (!empty($ids)) {
$ids = array();
$data = (array)data_submitted();
foreach ($data as $name => $value) {
if (preg_match('/^box\d+$/', $name)) {
$ids[] = intval($value);
}
}
if (count($ids)) {
$select = "hotpot='$hotpot->id' AND clickreportid IN (".implode(',', $ids).")";
}
break;
+42 -43
View File
@@ -1,6 +1,9 @@
<?PHP
class hotpot_xml_quiz_template extends hotpot_xml_template_default {
// left and right items for JMatch
var $l_items = array();
var $r_items = array();
// constructor function for this class
function hotpot_xml_quiz_template(&$parent) {
@@ -416,28 +419,26 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
return $i;
}
function v6_expand_MatchDivItems() {
$l_items = array();
$r_items = array();
$this->get_jmatch_items($l_items, $r_items);
$this->set_jmatch_items();
$l_keys = $this->shuffle_jmatch_items($l_items);
$r_keys = $this->shuffle_jmatch_items($r_items);
$l_keys = $this->shuffle_jmatch_items($this->l_items);
$r_keys = $this->shuffle_jmatch_items($this->r_items);
$options = '<option value="x">'.$this->parent->xml_value('data,matching-exercise,default-right-item').'</option>';
foreach ($r_keys as $key) {
if (empty($r_items[$key]['fixed'][0]['#'])) {
$options .= '<option value="'.$key.'">'.$r_items[$key]['text'][0]['#'].'</option>'."\n";
if (! $this->r_items[$key]['fixed']) {
$options .= '<option value="'.$key.'">'.$this->r_items[$key]['text'].'</option>'."\n";
}
}
$str = '';
foreach ($l_keys as $key) {
$str .= '<tr><td class="LeftItem">'.$l_items[$key]['text'][0]['#'].'</td>';
$str .= '<tr><td class="LeftItem">'.$this->l_items[$key]['text'].'</td>';
$str .= '<td class="RightItem">';
if (empty($r_items[$key]['fixed'][0]['#'])) {
$str .= '<select id="s'.$key.'_'.$key.'">'.$options.'</select>';
if ($this->r_items[$key]['fixed']) {
$str .= $this->r_items[$key]['text'];
} else {
$str .= $r_items[$key]['text'][0]['#'];
$str .= '<select id="s'.$key.'_'.$key.'">'.$options.'</select>';
}
$str .= '</td><td></td></tr>';
}
@@ -707,55 +708,53 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
// specials (JMatch)
function v6_expand_FixedArray() {
$l_items = array();
$r_items = array();
$this->get_jmatch_items($l_items, $r_items);
$this->set_jmatch_items();
$str = '';
foreach ($l_items as $i=>$item) {
foreach ($this->l_items as $i=>$item) {
$str .= "F[$i] = new Array();\n";
$str .= "F[$i][0] = '".$this->js_safe($item['text'][0]['#'], true)."';\n";
$str .= "F[$i][0] = '".$this->js_safe($item['text'], true)."';\n";
$str .= "F[$i][1] = ".($i+1).";\n";
}
return $str;
}
function v6_expand_DragArray() {
$l_items = array();
$r_items = array();
$this->get_jmatch_items($l_items, $r_items);
$this->set_jmatch_items();
$str = '';
foreach ($r_items as $i=>$item) {
foreach ($this->r_items as $i=>$item) {
$str .= "D[$i] = new Array();\n";
$str .= "D[$i][0] = '".$this->js_safe($item['text'][0]['#'], true)."';\n";
$str .= "D[$i][0] = '".$this->js_safe($item['text'], true)."';\n";
$str .= "D[$i][1] = ".($i+1).";\n";
$str .= "D[$i][2] = '".(empty($item['fixed'][0]['#']) ? 0 : 1)."';\n";
}
$str .= "D[$i][2] = '".$item['fixed']."';\n";
}
return $str;
}
function get_jmatch_items(&$l_items, &$r_items) {
$tags = 'data,matching-exercise,pair';
$i = 0;
while($item = $this->parent->xml_value($tags,"[$i]['#']['left-item'][0]['#']")) {
if (!empty($item['text'][0]['#'])) {
$l_items[] = $item;
function set_jmatch_items() {
if (empty($this->l_items)) {
$tags = 'data,matching-exercise,pair';
$i = 0;
while (($leftitem = "[$i]['#']['left-item'][0]['#']") && $this->parent->xml_value($tags, $leftitem)) {
$lefttext = $this->parent->xml_value($tags, $leftitem."['text'][0]['#']");
if (strlen($lefttext)) {
$this->l_items[] = array(
'text' => $lefttext,
'fixed' => $this->int_value($tags, $leftitem."['fixed'][0]['#']")
);
$rightitem = "[$i]['#']['right-item'][0]['#']";
$this->r_items[] = array(
'text' => $this->parent->xml_value($tags, $rightitem."['text'][0]['#']"),
'fixed' => $this->int_value($tags, $rightitem."['fixed'][0]['#']")
);
}
$i++;
}
$i++;
}
$i = 0;
while($item = $this->parent->xml_value($tags,"[$i]['#']['right-item'][0]['#']")) {
if (!empty($item['text'][0]['#'])) {
$r_items[] = $item;
}
$i++;
}
}
function shuffle_jmatch_items(&$items) {
// get moveable items
$moveable_keys = array();
for($i=0; $i<count($items); $i++) {
if(empty($items[$i]['fixed'][0]['#'])) {
if(empty($items[$i]['fixed'])) {
$moveable_keys[] = $i;
}
}
@@ -765,11 +764,11 @@ class hotpot_xml_quiz_template extends hotpot_xml_template_default {
$keys = array();
for($i=0, $ii=0; $i<count($items); $i++) {
if(empty($items[$i]['fixed'][0]['#'])) {
// moveable items are inserted in a shuffled order
if(empty($items[$i]['fixed'])) {
// moveable items are inserted in a shuffled order
$keys[] = $moveable_keys[$ii++];
} else {
// fixed items stay where they are
// fixed items stay where they are
$keys[] = $i;
}
}
+1 -1
View File
@@ -61,7 +61,7 @@
} else if ($hotpot->subnet && !address_in_subnet($_SERVER['REMOTE_ADDR'], $hotpot->subnet)) {
$error = get_string("subneterror", "quiz");
// check number of attempts
} else if ($hotpot->attempts && $hotpot->attempts <= count_records('hotpot_attempts', 'hotpot', $hotpot->id, 'userid', $USER->id)) {
} else if ($hotpot->attempts && $hotpot->attempts <= count_records_select('hotpot_attempts', 'hotpot='.$hotpot->id.' AND userid='.$USER->id, 'COUNT(DISTINCT clickreportid)')) {
$error = get_string("nomoreattempts", "quiz");
// get password
} else if ($hotpot->password && empty($hppassword)) {
-315
View File
@@ -1,315 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/quiz/db" VERSION="20070522" COMMENT="XMLDB file for Moodle mod/quiz"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="question_categories" COMMENT="Categories are for grouping questions" NEXT="question">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="contextid"/>
<FIELD NAME="contextid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="context that this category is shared in" PREVIOUS="name" NEXT="info"/>
<FIELD NAME="info" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="contextid" NEXT="stamp"/>
<FIELD NAME="stamp" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="info" NEXT="parent"/>
<FIELD NAME="parent" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="stamp" NEXT="sortorder"/>
<FIELD NAME="sortorder" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="999" SEQUENCE="false" ENUM="false" PREVIOUS="parent"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_categories" NEXT="parent"/>
<KEY NAME="parent" TYPE="foreign" FIELDS="parent" REFTABLE="question_categories" REFFIELDS="id" COMMENT="note that to make this recursive FK working someday, the parent field must be declared NULL" PREVIOUS="primary"/>
</KEYS>
<INDEXES>
<INDEX NAME="contextid" UNIQUE="false" FIELDS="contextid" COMMENT="links to context table"/>
</INDEXES>
</TABLE>
<TABLE NAME="question" COMMENT="The questions themselves" PREVIOUS="question_categories" NEXT="question_answers">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="category"/>
<FIELD NAME="category" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="parent"/>
<FIELD NAME="parent" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="category" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="parent" NEXT="questiontext"/>
<FIELD NAME="questiontext" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="questiontextformat"/>
<FIELD NAME="questiontextformat" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="questiontext" NEXT="image"/>
<FIELD NAME="image" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="questiontextformat" NEXT="generalfeedback"/>
<FIELD NAME="generalfeedback" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="to store the question feedback" PREVIOUS="image" NEXT="defaultgrade"/>
<FIELD NAME="defaultgrade" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="generalfeedback" NEXT="penalty"/>
<FIELD NAME="penalty" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0.1" SEQUENCE="false" ENUM="false" PREVIOUS="defaultgrade" NEXT="qtype"/>
<FIELD NAME="qtype" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="penalty" NEXT="length"/>
<FIELD NAME="length" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="qtype" NEXT="stamp"/>
<FIELD NAME="stamp" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="length" NEXT="version"/>
<FIELD NAME="version" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="stamp" NEXT="hidden"/>
<FIELD NAME="hidden" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="version" NEXT="timecreated"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="time question was created" PREVIOUS="hidden" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="time that question was last modified" PREVIOUS="timecreated" NEXT="createdby"/>
<FIELD NAME="createdby" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="userid of person who created this question" PREVIOUS="timemodified" NEXT="modifiedby"/>
<FIELD NAME="modifiedby" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="userid of person who last edited this question" PREVIOUS="createdby"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question" NEXT="category"/>
<KEY NAME="category" TYPE="foreign" FIELDS="category" REFTABLE="question_categories" REFFIELDS="id" PREVIOUS="primary" NEXT="parent"/>
<KEY NAME="parent" TYPE="foreign" FIELDS="parent" REFTABLE="question" REFFIELDS="id" COMMENT="note that to make this recursive FK working someday, the parent field must be declared NULL" PREVIOUS="category" NEXT="createdby"/>
<KEY NAME="createdby" TYPE="foreign" FIELDS="createdby" REFTABLE="user" REFFIELDS="id" COMMENT="foreign (createdby) references user (id)" PREVIOUS="parent" NEXT="modifiedby"/>
<KEY NAME="modifiedby" TYPE="foreign" FIELDS="modifiedby" REFTABLE="user" REFFIELDS="id" COMMENT="foreign (modifiedby) references user (id)" PREVIOUS="createdby"/>
</KEYS>
</TABLE>
<TABLE NAME="question_answers" COMMENT="Answers, with a fractional grade (0-1) and feedback" PREVIOUS="question" NEXT="question_dataset_definitions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="question"/>
<FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="answer"/>
<FIELD NAME="answer" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="question" NEXT="fraction"/>
<FIELD NAME="fraction" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="answer" NEXT="feedback"/>
<FIELD NAME="feedback" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="fraction"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_answers" NEXT="question"/>
<KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="question" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
</TABLE>
<TABLE NAME="question_dataset_definitions" COMMENT="Organises and stores properties for dataset items" PREVIOUS="question_answers" NEXT="question_dataset_items">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="category"/>
<FIELD NAME="category" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="category" NEXT="type"/>
<FIELD NAME="type" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="options"/>
<FIELD NAME="options" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="type" NEXT="itemcount"/>
<FIELD NAME="itemcount" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="options"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_dataset_definitions" NEXT="category"/>
<KEY NAME="category" TYPE="foreign" FIELDS="category" REFTABLE="question_categories" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
</TABLE>
<TABLE NAME="question_dataset_items" COMMENT="Individual dataset items" PREVIOUS="question_dataset_definitions" NEXT="question_datasets">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="definition"/>
<FIELD NAME="definition" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="itemnumber"/>
<FIELD NAME="itemnumber" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="definition" NEXT="value"/>
<FIELD NAME="value" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="itemnumber"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_dataset_items"/>
</KEYS>
<INDEXES>
<INDEX NAME="definition" UNIQUE="false" FIELDS="definition"/>
</INDEXES>
</TABLE>
<TABLE NAME="question_datasets" COMMENT="Many-many relation between questions and dataset definitions" PREVIOUS="question_dataset_items" NEXT="question_numerical_units">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="question"/>
<FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="datasetdefinition"/>
<FIELD NAME="datasetdefinition" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="question"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_datasets" NEXT="question"/>
<KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="question" REFFIELDS="id" PREVIOUS="primary" NEXT="datasetdefinition"/>
<KEY NAME="datasetdefinition" TYPE="foreign" FIELDS="datasetdefinition" REFTABLE="question_dataset_definitions" REFFIELDS="id" PREVIOUS="question"/>
</KEYS>
<INDEXES>
<INDEX NAME="question-datasetdefinition" UNIQUE="false" FIELDS="question, datasetdefinition"/>
</INDEXES>
</TABLE>
<TABLE NAME="question_numerical_units" COMMENT="Optional unit options for numerical questions" PREVIOUS="question_datasets" NEXT="question_attempts">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="question"/>
<FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="multiplier"/>
<FIELD NAME="multiplier" TYPE="number" LENGTH="40" NOTNULL="true" UNSIGNED="false" DEFAULT="1.00000000000000000000" SEQUENCE="false" ENUM="false" DECIMALS="20" PREVIOUS="question" NEXT="unit"/>
<FIELD NAME="unit" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="multiplier"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_numerical_units" NEXT="question"/>
<KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="question" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
<INDEXES>
<INDEX NAME="question-unit" UNIQUE="true" FIELDS="question, unit" COMMENT="Unique index to ensure that only one unit with a particular name is created for each question."/>
</INDEXES>
</TABLE>
<TABLE NAME="question_attempts" COMMENT="Student attempts. This table gets extended by the modules" PREVIOUS="question_numerical_units" NEXT="question_states">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="modulename"/>
<FIELD NAME="modulename" TYPE="char" LENGTH="20" NOTNULL="true" DEFAULT="quiz" SEQUENCE="false" ENUM="false" PREVIOUS="id"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_attempts"/>
</KEYS>
</TABLE>
<TABLE NAME="question_states" COMMENT="Stores user responses to an attempt, and percentage grades" PREVIOUS="question_attempts" NEXT="question_sessions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="attempt"/>
<FIELD NAME="attempt" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="question"/>
<FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="attempt" NEXT="originalquestion"/>
<FIELD NAME="originalquestion" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="question" NEXT="seq_number"/>
<FIELD NAME="seq_number" TYPE="int" LENGTH="6" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="originalquestion" NEXT="answer"/>
<FIELD NAME="answer" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="seq_number" NEXT="timestamp"/>
<FIELD NAME="timestamp" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="answer" NEXT="event"/>
<FIELD NAME="event" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timestamp" NEXT="grade"/>
<FIELD NAME="grade" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="event" NEXT="raw_grade"/>
<FIELD NAME="raw_grade" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="grade" NEXT="penalty"/>
<FIELD NAME="penalty" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="raw_grade"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_states" NEXT="attempt"/>
<KEY NAME="attempt" TYPE="foreign" FIELDS="attempt" REFTABLE="question_attempts" REFFIELDS="id" PREVIOUS="primary" NEXT="question"/>
<KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="question" REFFIELDS="id" PREVIOUS="attempt"/>
</KEYS>
</TABLE>
<TABLE NAME="question_sessions" COMMENT="Gives ids of the newest open and newest graded states" PREVIOUS="question_states" NEXT="quiz">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="attemptid"/>
<FIELD NAME="attemptid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="questionid"/>
<FIELD NAME="questionid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="attemptid" NEXT="newest"/>
<FIELD NAME="newest" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="questionid" NEXT="newgraded"/>
<FIELD NAME="newgraded" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="newest" NEXT="sumpenalty"/>
<FIELD NAME="sumpenalty" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="newgraded" NEXT="manualcomment"/>
<FIELD NAME="manualcomment" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="sumpenalty"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_sessions" NEXT="attemptid"/>
<KEY NAME="attemptid" TYPE="foreign" FIELDS="attemptid" REFTABLE="question_attempts" REFFIELDS="id" PREVIOUS="primary" NEXT="questionid"/>
<KEY NAME="questionid" TYPE="foreign" FIELDS="questionid" REFTABLE="question" REFFIELDS="id" PREVIOUS="attemptid" NEXT="newest"/>
<KEY NAME="newest" TYPE="foreign" FIELDS="newest" REFTABLE="question_states" REFFIELDS="id" PREVIOUS="questionid" NEXT="newgraded"/>
<KEY NAME="newgraded" TYPE="foreign" FIELDS="newgraded" REFTABLE="question_states" REFFIELDS="id" PREVIOUS="newest"/>
</KEYS>
<INDEXES>
<INDEX NAME="attemptid-questionid" UNIQUE="true" FIELDS="attemptid, questionid"/>
</INDEXES>
</TABLE>
<TABLE NAME="quiz" COMMENT="Main information about each quiz" PREVIOUS="question_sessions" NEXT="quiz_attempts">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="course"/>
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="intro"/>
<FIELD NAME="intro" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="timeopen"/>
<FIELD NAME="timeopen" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="intro" NEXT="timeclose"/>
<FIELD NAME="timeclose" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timeopen" NEXT="optionflags"/>
<FIELD NAME="optionflags" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timeclose" NEXT="penaltyscheme"/>
<FIELD NAME="penaltyscheme" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="optionflags" NEXT="attempts"/>
<FIELD NAME="attempts" TYPE="int" LENGTH="6" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="penaltyscheme" NEXT="attemptonlast"/>
<FIELD NAME="attemptonlast" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="attempts" NEXT="grademethod"/>
<FIELD NAME="grademethod" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="attemptonlast" NEXT="decimalpoints"/>
<FIELD NAME="decimalpoints" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="2" SEQUENCE="false" ENUM="false" PREVIOUS="grademethod" NEXT="review"/>
<FIELD NAME="review" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="decimalpoints" NEXT="questionsperpage"/>
<FIELD NAME="questionsperpage" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="review" NEXT="shufflequestions"/>
<FIELD NAME="shufflequestions" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="questionsperpage" NEXT="shuffleanswers"/>
<FIELD NAME="shuffleanswers" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="shufflequestions" NEXT="questions"/>
<FIELD NAME="questions" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="shuffleanswers" NEXT="sumgrades"/>
<FIELD NAME="sumgrades" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="questions" NEXT="grade"/>
<FIELD NAME="grade" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="sumgrades" NEXT="timecreated"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="grade" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="timelimit"/>
<FIELD NAME="timelimit" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="password"/>
<FIELD NAME="password" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="timelimit" NEXT="subnet"/>
<FIELD NAME="subnet" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="password" NEXT="popup"/>
<FIELD NAME="popup" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="subnet" NEXT="delay1"/>
<FIELD NAME="delay1" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="popup" NEXT="delay2"/>
<FIELD NAME="delay2" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="delay1"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for quiz"/>
</KEYS>
<INDEXES>
<INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
</INDEXES>
</TABLE>
<TABLE NAME="quiz_attempts" COMMENT="Stores various attempts on a quiz" PREVIOUS="quiz" NEXT="quiz_grades">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="uniqueid"/>
<FIELD NAME="uniqueid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="quiz"/>
<FIELD NAME="quiz" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="uniqueid" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="quiz" NEXT="attempt"/>
<FIELD NAME="attempt" TYPE="int" LENGTH="6" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="sumgrades"/>
<FIELD NAME="sumgrades" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="attempt" NEXT="timestart"/>
<FIELD NAME="timestart" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="sumgrades" NEXT="timefinish"/>
<FIELD NAME="timefinish" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timestart" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timefinish" NEXT="layout"/>
<FIELD NAME="layout" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="preview"/>
<FIELD NAME="preview" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="layout"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for quiz_attempts" NEXT="uniqueid"/>
<KEY NAME="uniqueid" TYPE="foreign-unique" FIELDS="uniqueid" REFTABLE="question_attempts" REFFIELDS="id" PREVIOUS="primary" NEXT="quiz"/>
<KEY NAME="quiz" TYPE="foreign" FIELDS="quiz" REFTABLE="quiz" REFFIELDS="id" PREVIOUS="uniqueid"/>
</KEYS>
<INDEXES>
<INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
</INDEXES>
</TABLE>
<TABLE NAME="quiz_grades" COMMENT="Final quiz grade (may be best of several attempts)" PREVIOUS="quiz_attempts" NEXT="quiz_question_instances">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="quiz"/>
<FIELD NAME="quiz" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="quiz" NEXT="grade"/>
<FIELD NAME="grade" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="grade"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for quiz_grades" NEXT="quiz"/>
<KEY NAME="quiz" TYPE="foreign" FIELDS="quiz" REFTABLE="quiz" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
<INDEXES>
<INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
</INDEXES>
</TABLE>
<TABLE NAME="quiz_question_instances" COMMENT="The grade for a question in a quiz" PREVIOUS="quiz_grades" NEXT="quiz_question_versions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="quiz"/>
<FIELD NAME="quiz" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="question"/>
<FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="quiz" NEXT="grade"/>
<FIELD NAME="grade" TYPE="int" LENGTH="6" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="question"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for quiz_question_instances" NEXT="quiz"/>
<KEY NAME="quiz" TYPE="foreign" FIELDS="quiz" REFTABLE="quiz" REFFIELDS="id" PREVIOUS="primary" NEXT="question"/>
<KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="question" REFFIELDS="id" PREVIOUS="quiz"/>
</KEYS>
</TABLE>
<TABLE NAME="quiz_question_versions" COMMENT="quiz_question_versions table retrofitted from MySQL" PREVIOUS="quiz_question_instances" NEXT="quiz_feedback">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="quiz"/>
<FIELD NAME="quiz" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="oldquestion"/>
<FIELD NAME="oldquestion" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="quiz" NEXT="newquestion"/>
<FIELD NAME="newquestion" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="oldquestion" NEXT="originalquestion"/>
<FIELD NAME="originalquestion" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="newquestion" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="originalquestion" NEXT="timestamp"/>
<FIELD NAME="timestamp" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for quiz_question_versions" NEXT="quiz"/>
<KEY NAME="quiz" TYPE="foreign" FIELDS="quiz" REFTABLE="quiz" REFFIELDS="id" PREVIOUS="primary" NEXT="oldquestion"/>
<KEY NAME="oldquestion" TYPE="foreign" FIELDS="oldquestion" REFTABLE="question" REFFIELDS="id" PREVIOUS="quiz" NEXT="newquestion"/>
<KEY NAME="newquestion" TYPE="foreign" FIELDS="newquestion" REFTABLE="question" REFFIELDS="id" PREVIOUS="oldquestion" NEXT="originalquestion"/>
<KEY NAME="originalquestion" TYPE="foreign" FIELDS="originalquestion" REFTABLE="question" REFFIELDS="id" PREVIOUS="newquestion"/>
</KEYS>
</TABLE>
<TABLE NAME="quiz_feedback" COMMENT="Feedback given to students based on their overall score on the test" PREVIOUS="quiz_question_versions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="quizid"/>
<FIELD NAME="quizid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="feedbacktext"/>
<FIELD NAME="feedbacktext" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="quizid" NEXT="mingrade"/>
<FIELD NAME="mingrade" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="feedbacktext" NEXT="maxgrade"/>
<FIELD NAME="maxgrade" TYPE="float" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="mingrade"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for quiz_feedback" NEXT="quizid"/>
<KEY NAME="quizid" TYPE="foreign" FIELDS="quizid" REFTABLE="quiz" REFFIELDS="id" PREVIOUS="primary"/>
</KEYS>
</TABLE>
</TABLES>
<STATEMENTS>
<STATEMENT NAME="insert log_display" TYPE="insert" TABLE="log_display" COMMENT="Initial insert of records on table log_display">
<SENTENCES>
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'add', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'update', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'view', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'report', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'attempt', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'submit', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'review', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'editquestions', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'preview', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'start attempt', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'close attempt', 'quiz', 'name')" />
<SENTENCE TEXT="(module, action, mtable, field) VALUES ('quiz', 'continue attempt', 'quiz', 'name')" />
</SENTENCES>
</STATEMENT>
</STATEMENTS>
</XMLDB>
-200
View File
@@ -1,200 +0,0 @@
<?php //$Id$
// This file keeps track of upgrades to
// the quiz module
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function question_category_next_parent_in($contextid, $question_categories, $id){
$nextparent = $question_categories[$id]->parent;
if ($nextparent == 0){
return 0;
} elseif (!array_key_exists($nextparent, $question_categories)){
//finished searching up the category hierarchy. For some reason
//the top level items is not 0. We'll return 0 though.
return 0;
} elseif ($contextid == $question_categories[$nextparent]->contextid){
return $nextparent;
} else {
//parent is not in the same context look further up.
return question_category_next_parent_in($contextid, $question_categories, $nextparent);
}
}
/**
* Check that either category parent is 0 or a category shared in the same context.
* Fix any categories to point to grand or grand grand parent etc in the same context or 0.
*/
function question_category_checking($question_categories){
//make an array that is easier to search
$newparents = array();
foreach ($question_categories as $id => $category){
$newparents[$id] = question_category_next_parent_in($category->contextid, $question_categories, $id);
}
foreach (array_Keys($question_categories) as $id){
$question_categories[$id]->parent = $newparents[$id];
}
return $question_categories;
}
function xmldb_quiz_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
if ($result && $oldversion < 2007022800) {
/// Ensure that there are not existing duplicate entries in the database.
$duplicateunits = get_records_select('question_numerical_units', "id > (SELECT MIN(iqnu.id)
FROM {$CFG->prefix}question_numerical_units iqnu
WHERE iqnu.question = {$CFG->prefix}question_numerical_units.question AND
iqnu.unit = {$CFG->prefix}question_numerical_units.unit)", '', 'id');
if ($duplicateunits) {
delete_records_select('question_numerical_units', 'id IN (' . implode(',', array_keys($duplicateunits)) . ')');
}
/// Define index question-unit (unique) to be added to question_numerical_units
$table = new XMLDBTable('question_numerical_units');
$index = new XMLDBIndex('question-unit');
$index->setAttributes(XMLDB_INDEX_UNIQUE, array('question', 'unit'));
/// Launch add index question-unit
$result = $result && add_index($table, $index);
}
if ($result && $oldversion < 2007050805) {
$question_categories = get_records('question_categories');
foreach ($question_categories as $id => $question_category){
$course = $question_categories[$id]->course;
unset($question_categories[$id]->course);
if ($question_categories[$id]->publish){
$context = get_context_instance(CONTEXT_SYSTEM);
} else {
$context = get_context_instance(CONTEXT_COURSE, $course);
}
$question_categories[$id]->contextid = $context->id;
unset($question_categories[$id]->publish);
}
$question_categories = question_category_checking($question_categories);
/// Define index course (not unique) to be dropped form question_categories
$table = new XMLDBTable('question_categories');
$index = new XMLDBIndex('course');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('course'));
/// Launch drop index course
$result = $result && drop_index($table, $index);
/// Define field course to be dropped from question_categories
$field = new XMLDBField('course');
/// Launch drop field course
$result = $result && drop_field($table, $field);
/// Define field context to be added to question_categories
$field = new XMLDBField('contextid');
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'name');
$field->comment = 'context that this category is shared in';
/// Launch add field context
$result = $result && add_field($table, $field);
/// Define index context (not unique) to be added to question_categories
$index = new XMLDBIndex('contextid');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('contextid'));
$index->comment = 'links to context table';
/// Launch add index context
$result = $result && add_index($table, $index);
$field = new XMLDBField('publish');
/// Launch drop field publish
$result = $result && drop_field($table, $field);
/// update table contents with previously calculated new contents.
foreach ($question_categories as $question_category){
if (!$result = update_record('question_categories', $question_category)){
notify('Couldn\'t update question_categories "'. $question_category->name .'"!');
}
}
}
if ($result && $oldversion < 2007052200) {
/// Define field timecreated to be added to question
$table = new XMLDBTable('question');
$field = new XMLDBField('timecreated');
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'hidden');
/// Launch add field timecreated
$result = $result && add_field($table, $field);
/// Define field timemodified to be added to question
$table = new XMLDBTable('question');
$field = new XMLDBField('timemodified');
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'timecreated');
/// Launch add field timemodified
$result = $result && add_field($table, $field);
/// Define field createdby to be added to question
$table = new XMLDBTable('question');
$field = new XMLDBField('createdby');
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null, 'timemodified');
/// Launch add field createdby
$result = $result && add_field($table, $field);
/// Define field modifiedby to be added to question
$table = new XMLDBTable('question');
$field = new XMLDBField('modifiedby');
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null, 'createdby');
/// Launch add field modifiedby
$result = $result && add_field($table, $field);
/// Define key createdby (foreign) to be added to question
$table = new XMLDBTable('question');
$key = new XMLDBKey('createdby');
$key->setAttributes(XMLDB_KEY_FOREIGN, array('createdby'), 'user', array('id'));
/// Launch add key createdby
$result = $result && add_key($table, $key);
/// Define key modifiedby (foreign) to be added to question
$table = new XMLDBTable('question');
$key = new XMLDBKey('modifiedby');
$key->setAttributes(XMLDB_KEY_FOREIGN, array('modifiedby'), 'user', array('id'));
/// Launch add key modifiedby
$result = $result && add_key($table, $key);
}
return $result;
}
?>
+2 -2
View File
@@ -5,8 +5,8 @@
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2007052200; // The (date) version of this module
$module->requires = 2007020200; // Requires this Moodle version
$module->version = 2006060700; // The (date) version of this module
$module->requires = 2006022400; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?
?>
+1 -9
View File
@@ -44,8 +44,6 @@
if (! $cm = get_coursemodule_from_instance("wiki", $wiki->id, $course->id)) {
error("Course Module ID was incorrect");
}
$id = $cm->id;
$_REQUEST["id"] = $id;
}
require_course_login($course, true, $cm);
@@ -56,9 +54,6 @@
/// Default format:
$moodle_format=FORMAT_MOODLE;
### SAVE ID from Moodle
$moodleID=@$_REQUEST["id"];
/// Globally disable CamelCase, if the option is selected for this wiki.
$moodle_disable_camel_case = ($wiki->disablecamelcase == 1);
@@ -98,7 +93,7 @@
/// Build the ewsiki script constant
/// ewbase will also be needed by EWIKI_SCRIPT_BINARY
$ewbase = 'view.php?id='.$moodleID;
$ewbase = 'view.php?id='.$cm->id;
if (isset($userid) && $userid!=0) $ewbase .= '&amp;userid='.$userid;
if (isset($groupid) && $groupid!=0) $ewbase .= '&amp;groupid='.$groupid;
$ewscript = $ewbase.'&amp;page=';
@@ -207,9 +202,6 @@
$content=ewiki_page($page);
$content2='';
### RESTORE ID from Moodle
$_REQUEST["id"]=$moodleID;
$id=$moodleID;
/// ################# EWIKI Part ###########################
}
else {
+44 -5
View File
@@ -20,12 +20,29 @@ class qformat_hotpot extends qformat_default {
/// where each item is a question object as defined by
/// readquestion().
// set baseurl
global $CFG;
// set courseid and baseurl
global $CFG, $COURSE, $course;
switch (true) {
case isset($this->course->id):
// import to quiz module
$courseid = $this->course->id;
break;
case isset($course->id):
// import to lesson module
$courseid = $course->id;
break;
case isset($COURSE->id):
// last resort
$courseid = $COURSE->id;
break;
default:
// shouldn't happen !!
$courseid = 0;
}
if ($CFG->slasharguments) {
$baseurl = "$CFG->wwwroot/file.php/{$this->course->id}/";
$baseurl = "$CFG->wwwroot/file.php/$courseid/";
} else {
$baseurl = "$CFG->wwwroot/file.php?file=/{$this->course->id}/";
$baseurl = "$CFG->wwwroot/file.php?file=/$courseid/";
}
// get import file name
@@ -502,7 +519,8 @@ class qformat_hotpot extends qformat_default {
}
function hotpot_prepare_str($str) {
// convert html entities to unicode and add slashes
$str = preg_replace('/&#[x0-9A-F]+;/ie', "html_entity_decode('\\0',ENT_NOQUOTES,'UTF-8')", $str);
$str = preg_replace('/&#x([0-9a-f]+);/ie', "hotpot_charcode_to_utf8(hexdec('\\1'))", $str);
$str = preg_replace('/&#([0-9]+);/e', "hotpot_charcode_to_utf8(\\1)", $str);
return addslashes($str);
}
} // end class
@@ -609,6 +627,27 @@ class hotpot_xml_tree {
}
}
function hotpot_charcode_to_utf8($charcode) {
if ($charcode <= 0x7F) {
// ascii char (roman alphabet + punctuation)
return chr($charcode);
}
if ($charcode <= 0x7FF) {
// 2-byte char
return chr(($charcode >> 0x06) + 0xC0).chr(($charcode & 0x3F) + 128);
}
if ($charcode <= 0xFFFF) {
// 3-byte char
return chr(($charcode >> 0x0C) + 0xE0).chr((($charcode >> 0x06) & 0x3F) + 0x80).chr(($charcode & 0x3F) + 0x80);
}
if ($charcode <= 0x1FFFFF) {
// 4-byte char
return chr(($charcode >> 0x12) + 0xF0).chr((($charcode >> 0x0C) & 0x3F) + 0x80).chr((($charcode >> 0x06) & 0x3F) + 0x80).chr(($charcode & 0x3F) + 0x80);
}
// unidentified char code !!
return ' ';
}
function hotpot_utf8_to_html_entity($char) {
// http://www.zend.com/codex.php?id=835&single=1
+145 -146
View File
@@ -1,146 +1,145 @@
<?xml version="1.0" ?>
<activityset setno="2">
<title>Maths</title>
<questions>
<question type="multiChoice">
<text>The ages, in years, of 10 horses in a field were 3, 3, 4, 5, 7, 7, 7, 8, 8, 8,&lt;p&gt;
Which one of the following is true?</text>
<award>1</award>
<hint>mean = (3+3+4+5+7+7+7+8+8+8)/10 = 6&lt;p&gt;
median = 7 i.e the middle number&lt;p&gt;
range = 8-3 = 5</hint>
<answer>
<option correct="yes">median &gt; mean &gt; range</option>
<option correct="no">mean = median</option>
<option correct="no">mean &gt; median &gt; range</option>
<option correct="no">median &gt; range &gt; mean</option>
</answer>
</question>
<question type="multiChoice">
<text>At a college, students are given a points score calculated from their GCSE grades.&lt;p&gt;
Someone with 4 A grades and 4 B grades gains a score of 36 points.&lt;br&gt;Someone with 2 A grades and 4 B grades gains a score of 26 points.&lt;br&gt;Someone with 3 A grades and 3 B grades would have a score of</text>
<award>1</award>
<hint>4A + 4B = 36 and 2A + 4B = 26&lt;p&gt;solving simultaneously gives A = 5 and B = 4</hint>
<answer>
<option correct="yes">27 points</option>
<option correct="no">21 points</option>
<option correct="no">30 points</option>
<option correct="no">31 points</option>
</answer>
</question>
<question type="multiChoice">
<text>A sequence consists of adding the previous three terms together to form the next term. The first three terms of the sequence are 1, 2, 3.&lt;p&gt;
What is the sixth term in the sequence?</text>
<award>1</award>
<hint>1, 2, 3, 6, 11, ...</hint>
<answer>
<option correct="yes">20</option>
<option correct="no">6</option>
<option correct="no">11</option>
<option correct="no">13</option>
</answer>
</question>
<question type="multiChoice">
<text>The value of an item is described as decreasing exponentially. Which description below best matches this statement?</text>
<award>1</award>
<hint>No hint - you either know this or you don't!</hint>
<answer>
<option correct="yes">The value falls by a smaller amount each year.</option>
<option correct="no">The value falls by the same amount each year.</option>
<option correct="no">The value falls by the same amount each year for a while, and then remains constant.</option>
<option correct="no">The value falls by a larger amount each year.</option>
</answer>
</question>
<question type="multiChoice">
<text>Consider the statement&lt;p&gt;
&quot;Schools with high numbers of pupils on free school meals do not do well in league tables.&quot;&lt;p&gt;
Which of the following statements follows logically from the one above?</text>
<award>1</award>
<hint>Factors other than the number of pupils on free school meals affect how well a school does in league tables.</hint>
<answer>
<option correct="yes">Schools which do well in league tables do not have high numbers of pupils on free school meals.</option>
<option correct="no">Schools with low numbers of pupils on free school meals do well in league tables.</option>
<option correct="no">Making all pupils pay for school meals will improve league table results.</option>
<option correct="no">Schools which do not do well in league tables have high numbers of pupils on free school meals.</option>
</answer>
</question>
<question type="multiChoice">
<text>The force between two point electric charges is inversely proportional to the square of their distance apart. What effect does doubling this distance have on the force?</text>
<award>1</award>
<hint>Inversely proportional means that increasing the distance decreases the force.&lt;br&gt;2 squared gives 4.</hint>
<answer>
<option correct="yes">The force decreases by a factor of four.</option>
<option correct="no">The force is halved.</option>
<option correct="no">The force is doubled.</option>
<option correct="no">The force increases by a factor of four.</option>
</answer>
</question>
<question type="multiChoice">
<text>Two of the five playing cards that Colin has are aces. He shuffles the five cards, then puts them face down on the table. Madge takes a card and then another. The probability that she now has &lt;b&gt;both&lt;/b&gt; of the aces is</text>
<award>1</award>
<hint>2/5 x 1/4</hint>
<answer>
<option correct="yes">1/10</option>
<option correct="no">4/25</option>
<option correct="no">1/5</option>
<option correct="no">2/5</option>
</answer>
</question>
<question type="multiChoice">
<text>A college's guidelines say that classes must have a minimum of 12 students and a maximum of 20 students. For what numbers of students studying a particular subject is it impossible to run classes without breaking the guidelines?</text>
<award>1</award>
<hint>between 12 and 20 students - one class&lt;br&gt;
between 24 and 36 students - two classes&lt;br&gt;
between 36 and 40 students - two classes</hint>
<answer>
<option correct="yes">between 20 and 24 students</option>
<option correct="no">between 12 and 20 students</option>
<option correct="no">between 24 and 36 students</option>
<option correct="no">between 36 and 40 students</option>
</answer>
</question>
<question type="multiChoice">
<text>The ages of two friends are in the ratio 3:4. In 8 years time their ages will be in the ratio 5:6. How old are they now?</text>
<award>1</award>
<hint>(12+8):(16+8) = 20:24 = 5:6</hint>
<answer>
<option correct="yes">12, 16</option>
<option correct="no">3, 4</option>
<option correct="no">6, 8</option>
<option correct="no">9, 12</option>
</answer>
</question>
<question type="multiChoice">
<text>A heavy construction vehicle travels for 40 minutes between sites, at an average speed of 16 km per second. The distance between sites is</text>
<award>1</award>
<hint>16/60 x 40</hint>
<answer>
<option correct="yes">10.7 km</option>
<option correct="no">2.5 km</option>
<option correct="no">6.4 km</option>
<option correct="no">38.4 km</option>
</answer>
</question>
<question type="multianswerchoice">
<text>Which of the following are features of a Virtual Learning Environment? (Select all that apply)</text>
<hint />
<answer>
<option correct="yes" award="1" deduct="0">course resources are available from home and from college</option>
<option correct="yes" award="1" deduct="0">forums enable collaborative work</option>
<option correct="yes" award="1" deduct="0">assessments can give instant feedback</option>
<option correct="yes" award="1" deduct="0">course progress is recorded</option>
<option correct="no" award="1" deduct="0">kettle is put on automatically for tea/coffee</option>
</answer>
</question>
<question type="multianswerchoice">
<text>Which of the following may a Virtual Learning Environment be used for? (Select all that apply)</text>
<hint />
<answer>
<option correct="yes" award="1" deduct="1">delivering a course online</option>
<option correct="yes" award="1" deduct="1">supporting face-to-face teaching</option>
<option correct="no" award="1" deduct="0">as a complete replacement for teachers</option>
</answer>
</question>
</questions>
</questions>
</activityset>
<?xml version="1.0" ?>
<activityset setno="2">
<title>Maths</title>
<questions>
<question type="multiChoice">
<text>The ages, in years, of 10 horses in a field were 3, 3, 4, 5, 7, 7, 7, 8, 8, 8,&lt;p&gt;
Which one of the following is true?</text>
<award>1</award>
<hint>mean = (3+3+4+5+7+7+7+8+8+8)/10 = 6&lt;p&gt;
median = 7 i.e the middle number&lt;p&gt;
range = 8-3 = 5</hint>
<answer>
<option correct="yes">median &gt; mean &gt; range</option>
<option correct="no">mean = median</option>
<option correct="no">mean &gt; median &gt; range</option>
<option correct="no">median &gt; range &gt; mean</option>
</answer>
</question>
<question type="multiChoice">
<text>At a college, students are given a points score calculated from their GCSE grades.&lt;p&gt;
Someone with 4 A grades and 4 B grades gains a score of 36 points.&lt;br&gt;Someone with 2 A grades and 4 B grades gains a score of 26 points.&lt;br&gt;Someone with 3 A grades and 3 B grades would have a score of</text>
<award>1</award>
<hint>4A + 4B = 36 and 2A + 4B = 26&lt;p&gt;solving simultaneously gives A = 5 and B = 4</hint>
<answer>
<option correct="yes">27 points</option>
<option correct="no">21 points</option>
<option correct="no">30 points</option>
<option correct="no">31 points</option>
</answer>
</question>
<question type="multiChoice">
<text>A sequence consists of adding the previous three terms together to form the next term. The first three terms of the sequence are 1, 2, 3.&lt;p&gt;
What is the sixth term in the sequence?</text>
<award>1</award>
<hint>1, 2, 3, 6, 11, ...</hint>
<answer>
<option correct="yes">20</option>
<option correct="no">6</option>
<option correct="no">11</option>
<option correct="no">13</option>
</answer>
</question>
<question type="multiChoice">
<text>The value of an item is described as decreasing exponentially. Which description below best matches this statement?</text>
<award>1</award>
<hint>No hint - you either know this or you don't!</hint>
<answer>
<option correct="yes">The value falls by a smaller amount each year.</option>
<option correct="no">The value falls by the same amount each year.</option>
<option correct="no">The value falls by the same amount each year for a while, and then remains constant.</option>
<option correct="no">The value falls by a larger amount each year.</option>
</answer>
</question>
<question type="multiChoice">
<text>Consider the statement&lt;p&gt;
&quot;Schools with high numbers of pupils on free school meals do not do well in league tables.&quot;&lt;p&gt;
Which of the following statements follows logically from the one above?</text>
<award>1</award>
<hint>Factors other than the number of pupils on free school meals affect how well a school does in league tables.</hint>
<answer>
<option correct="yes">Schools which do well in league tables do not have high numbers of pupils on free school meals.</option>
<option correct="no">Schools with low numbers of pupils on free school meals do well in league tables.</option>
<option correct="no">Making all pupils pay for school meals will improve league table results.</option>
<option correct="no">Schools which do not do well in league tables have high numbers of pupils on free school meals.</option>
</answer>
</question>
<question type="multiChoice">
<text>The force between two point electric charges is inversely proportional to the square of their distance apart. What effect does doubling this distance have on the force?</text>
<award>1</award>
<hint>Inversely proportional means that increasing the distance decreases the force.&lt;br&gt;2 squared gives 4.</hint>
<answer>
<option correct="yes">The force decreases by a factor of four.</option>
<option correct="no">The force is halved.</option>
<option correct="no">The force is doubled.</option>
<option correct="no">The force increases by a factor of four.</option>
</answer>
</question>
<question type="multiChoice">
<text>Two of the five playing cards that Colin has are aces. He shuffles the five cards, then puts them face down on the table. Madge takes a card and then another. The probability that she now has &lt;b&gt;both&lt;/b&gt; of the aces is</text>
<award>1</award>
<hint>2/5 x 1/4</hint>
<answer>
<option correct="yes">1/10</option>
<option correct="no">4/25</option>
<option correct="no">1/5</option>
<option correct="no">2/5</option>
</answer>
</question>
<question type="multiChoice">
<text>A college's guidelines say that classes must have a minimum of 12 students and a maximum of 20 students. For what numbers of students studying a particular subject is it impossible to run classes without breaking the guidelines?</text>
<award>1</award>
<hint>between 12 and 20 students - one class&lt;br&gt;
between 24 and 36 students - two classes&lt;br&gt;
between 36 and 40 students - two classes</hint>
<answer>
<option correct="yes">between 20 and 24 students</option>
<option correct="no">between 12 and 20 students</option>
<option correct="no">between 24 and 36 students</option>
<option correct="no">between 36 and 40 students</option>
</answer>
</question>
<question type="multiChoice">
<text>The ages of two friends are in the ratio 3:4. In 8 years time their ages will be in the ratio 5:6. How old are they now?</text>
<award>1</award>
<hint>(12+8):(16+8) = 20:24 = 5:6</hint>
<answer>
<option correct="yes">12, 16</option>
<option correct="no">3, 4</option>
<option correct="no">6, 8</option>
<option correct="no">9, 12</option>
</answer>
</question>
<question type="multiChoice">
<text>A heavy construction vehicle travels for 40 minutes between sites, at an average speed of 16 km per second. The distance between sites is</text>
<award>1</award>
<hint>16/60 x 40</hint>
<answer>
<option correct="yes">10.7 km</option>
<option correct="no">2.5 km</option>
<option correct="no">6.4 km</option>
<option correct="no">38.4 km</option>
</answer>
</question>
<question type="multianswerchoice">
<text>Which of the following are features of a Virtual Learning Environment? (Select all that apply)</text>
<hint />
<answer>
<option correct="yes" award="1" deduct="0">course resources are available from home and from college</option>
<option correct="yes" award="1" deduct="0">forums enable collaborative work</option>
<option correct="yes" award="1" deduct="0">assessments can give instant feedback</option>
<option correct="yes" award="1" deduct="0">course progress is recorded</option>
<option correct="no" award="1" deduct="0">kettle is put on automatically for tea/coffee</option>
</answer>
</question>
<question type="multianswerchoice">
<text>Which of the following may a Virtual Learning Environment be used for? (Select all that apply)</text>
<hint />
<answer>
<option correct="yes" award="1" deduct="1">delivering a course online</option>
<option correct="yes" award="1" deduct="1">supporting face-to-face teaching</option>
<option correct="no" award="1" deduct="0">as a complete replacement for teachers</option>
</answer>
</question>
</questions>
</activityset>
+2
View File
@@ -299,6 +299,8 @@ class qformat_xml extends qformat_default {
$qo = $this->import_headers( $question );
// header parts particular to shortanswer
$qo->qtype = DESCRIPTION;
$qo->defaultgrade = 0;
$qo->length = 0;
return $qo;
}
+20 -5
View File
@@ -222,6 +222,15 @@
$creatingnewquestion = true;
}
// Fixing bug #5482: random questions have parent field set to its own id,
// see: $QTYPES['random']->get_question_options()
if ($question->qtype == 'random') {
$question->parent = $newid;
//we have to update the random question if the question has been inserted
if ($creatingnewquestion && $newid)
$status = set_field('question', 'parent', $question->parent, 'id', $newid);
}
//Save newid to backup tables
if ($newid) {
//We have the newid, update backup_ids
@@ -250,17 +259,23 @@
$question->parent = $restored_questions[$i]->parent;
//If it's a new question in the DB, restore it
/// If it's a new question in the DB, restore it
if ($restored_questions[$i]->is_new) {
////We have to recode the parent field
if ($question->parent) {
/// We have to recode the parent field
if ($question->parent && $question->qtype != 'random') {
/// If the parent field needs to be changed, do it here. Random questions are dealt with above.
if ($parent = backup_getid($restore->backup_unique_code,"question",$question->parent)) {
$question->parent = $parent->new_id;
} elseif ($question->parent = $oldid) {
$question->parent = $newid;
if ($question->parent != $restored_questions[$i]->parent) {
if (!set_field('question', 'parent', $question->parent, 'id', $newid)) {
echo 'Could not update parent '.$question->parent.' for question '.$oldid.'<br />';
$status = false;
}
}
} else {
echo 'Could not recode parent '.$question->parent.' for question '.$oldid.'<br />';
$status = false;
}
}
+2 -52
View File
@@ -669,62 +669,12 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
}
if ($regs[1] == 'uniform') {
$nbr = $regs[2] + ($regs[3]-$regs[2])*mt_rand()/mt_getrandmax();
return round($nbr, $regs[4]);
return sprintf("%.".$regs[4]."f",$nbr);
} else if ($regs[1] == 'loguniform') {
$log0 = log(abs($regs[2])); // It would have worked the other way to
$nbr = exp($log0 + (log(abs($regs[3])) - $log0)*mt_rand()/mt_getrandmax());
// Reformat according to the precision $regs[4]:
// Determine the format 0.[1-9][0-9]* for the nbr...
$p10 = 0;
while ($nbr < 1) {
--$p10;
$nbr *= 10;
}
while ($nbr >= 1) {
++$p10;
$nbr /= 10;
}
// ... and have the nbr rounded off to the correct length
$nbr = round($nbr, $regs[4]);
// Have the nbr written on a suitable format,
// Either scientific or plain numeric
if (-2 > $p10 || 4 < $p10) {
// Use scientific format:
$eX = 'e'.--$p10;
$nbr *= 10;
if (1 == $regs[4]) {
$nbr = $nbr.$eX;
} else {
// Attach additional zeros at the end of $nbr,
$nbr .= (1==strlen($nbr) ? '.' : '')
. '00000000000000000000000000000000000000000x';
$nbr = substr($nbr, 0, $regs[4] +1).$eX;
}
} else {
// Stick to plain numeric format
$nbr *= "1e$p10";
if (0.1 <= $nbr / "1e$regs[4]") {
$nbr = $nbr;
} else {
// Could be an idea to add some zeros here
$nbr .= (ereg('^[0-9]*$', $nbr) ? '.' : '')
. '00000000000000000000000000000000000000000x';
$oklen = $regs[4] + ($p10 < 1 ? 2-$p10 : 1);
$nbr = substr($nbr, 0, $oklen);
}
}
// The larger of the values decide the sign in case the
// have equal different signs (which they really must not have)
if ($regs[2] + $regs[3] > 0) {
return $nbr;
} else {
return -$nbr;
}
return sprintf("%.".$regs[4]."f",$nbr);
} else {
error("The distribution $regs[1] caused problems");
@@ -1,135 +0,0 @@
<?php
/**
* @package questionbank
* @subpackage questiontypes
*/
class question_dataset_dependent_definitions_form extends moodleform {
/**
* Question object with options and answers already loaded by get_question_options
* Be careful how you use this it is needed sometimes to set up the structure of the
* form in definition_inner but data is always loaded into the form with set_defaults.
*
* @var object
*/
var $question;
/**
* Reference to question type object
*
* @var question_dataset_dependent_questiontype
*/
var $qtypeobj;
/**
* Add question-type specific form fields.
*
* @param MoodleQuickForm $mform the form being built.
*/
function question_dataset_dependent_definitions_form($submiturl, $question){
global $QTYPES;
$this->question = $question;
$this->qtypeobj =& $QTYPES[$this->question->qtype];
parent::moodleform($submiturl);
}
function definition() {
global $SESSION;
$mform =& $this->_form;
$stringfile = 'qtype_'.$this->question->qtype ;
$possibledatasets = $this->qtypeobj->find_dataset_names($this->question->questiontext);
$mandatorydatasets = array();
if (isset($this->question->options->answers)){
foreach ($this->question->options->answers as $answer) {
$mandatorydatasets += $this->qtypeobj->find_dataset_names($answer->answer);
}
}else{
foreach ($SESSION->datasetdependent->questionform->answers as $answer){
$mandatorydatasets += $this->qtypeobj->find_dataset_names($answer);
}
}
$key = 0;
$datadefscat= array();
$datadefscat = $this->qtypeobj->get_dataset_definitions_category($this->question);
$datasetmenus = array();
$label = "<div align=\"center\">".get_string('datasetrole', 'qtype_datasetdependent','numerical')."</div>";
$mform->addElement('html', $label);// explaining the role of datasets so other strings can be shortened
$mform->addElement('header', 'mandatoryhdr', get_string('mandatoryhdr', $stringfile));
$labelsharedwildcard = get_string("sharedwildcard", "qtype_datasetdependent");
foreach ($mandatorydatasets as $datasetname) {
if (!isset($datasetmenus[$datasetname])) {
list($options, $selected) =
$this->qtypeobj->dataset_options($this->question, $datasetname);
unset($options['0']); // Mandatory...
$label = get_string("wildcard", "quiz"). " <strong>$datasetname</strong> ";
$mform->addElement('select', "dataset[$key]", $label, $options);
if (isset($datadefscat[$datasetname])){
$mform->addElement('static', "there is a category", $labelsharedwildcard." <strong>$datasetname </strong>", get_string('dataitemdefined',"qtype_datasetdependent", $datadefscat[$datasetname]));
}
$mform->setDefault("dataset[$key]", $selected);
$datasetmenus[$datasetname]='';
$key++;
}
}
$mform->addElement('header', 'possiblehdr', get_string('possiblehdr', $stringfile));
foreach ($possibledatasets as $datasetname) {
if (!isset($datasetmenus[$datasetname])) {
list($options, $selected) =
$this->qtypeobj->dataset_options($this->question, $datasetname,false);
$label = get_string("wildcard", "quiz"). " <strong>$datasetname</strong> ";
$mform->addElement('select', "dataset[$key]", $label, $options);
// $mform->addRule("dataset[$key]", null, 'required', null, 'client');
if (isset($datadefscat[$datasetname])){
$mform->addElement('static', "there is a category", $labelsharedwildcard." <strong>$datasetname </strong>", get_string('dataitemdefined',"qtype_datasetdependent", $datadefscat[$datasetname]));
}
// $selected ="0";
$mform->setDefault("dataset[$key]", $selected);
$datasetmenus[$datasetname]='';
$key++;
}
}
$this->add_action_buttons(false, get_string('nextpage', 'qtype_calculated'));
//hidden elements
$mform->addElement('hidden', 'returnurl');
$mform->setType('returnurl', PARAM_URL);
$mform->addElement('hidden', 'qtype');
$mform->setType('qtype', PARAM_ALPHA);
$mform->addElement('hidden', 'category');
$mform->setType('category', PARAM_INT);
$mform->addElement('hidden', 'id');
$mform->addElement('hidden', 'courseid');
$mform->setType('courseid', PARAM_INT);
$mform->setDefault('courseid', 0);
$mform->addElement('hidden', 'cmid');
$mform->setType('cmid', PARAM_INT);
$mform->setDefault('cmid', 0);
$mform->setType('id', PARAM_INT);
$mform->addElement('hidden', 'wizard', 'datasetitems');
$mform->setType('wizard', PARAM_ALPHA);
}
function validation($data){
$errors = array();
$datasets = $data['dataset'];
$countvalid = 0 ;
foreach ($datasets as $key => $dataset){
if ($dataset !="0") {
$countvalid++;
}
}
if (!$countvalid){
foreach ($datasets as $key => $dataset){
$errors['dataset['.$key.']'] = get_string('atleastonerealdataset', 'qtype_datasetdependent');
}
}
return $errors;
}
}
?>
@@ -1,222 +0,0 @@
<?php
class question_dataset_dependent_items_form extends moodleform {
/**
* Question object with options and answers already loaded by get_question_options
* Be careful how you use this it is needed sometimes to set up the structure of the
* form in definition_inner but data is always loaded into the form with set_defaults.
*
* @var object
*/
var $question;
/**
* Reference to question type object
*
* @var question_dataset_dependent_questiontype
*/
var $qtypeobj;
var $datasetdefs;
var $maxnumber = -1;
var $regenerate;
var $noofitems;
/**
* Add question-type specific form fields.
*
* @param MoodleQuickForm $mform the form being built.
*/
function question_dataset_dependent_items_form($submiturl, $question, $regenerate){
global $QTYPES, $SESSION, $CFG;
$this->regenerate = $regenerate;
$this->question = $question;
$this->qtypeobj =& $QTYPES[$this->question->qtype];
//get the dataset defintions for this question
if (empty($question->id)) {
$this->datasetdefs = $this->qtypeobj->get_dataset_definitions($question->id, $SESSION->datasetdependent->definitionform->dataset);
} else {
if (empty($question->options)) {
$this->get_question_options($question);
}
$this->datasetdefs = $this->qtypeobj->get_dataset_definitions($question->id, array());
}
foreach ($this->datasetdefs as $datasetdef) {
// Get maxnumber
if ($this->maxnumber == -1 || $datasetdef->itemcount < $this->maxnumber) {
$this->maxnumber = $datasetdef->itemcount;
}
}
foreach ($this->datasetdefs as $defid => $datasetdef) {
if (isset($datasetdef->id)) {
$this->datasetdefs[$defid]->items = get_records_sql( // Use number as key!!
" SELECT itemnumber, definition, id, value
FROM {$CFG->prefix}question_dataset_items
WHERE definition = $datasetdef->id ");
}
}
parent::moodleform($submiturl);
}
function definition() {
$mform =& $this->_form;
$strquestionlabel = $this->qtypeobj->comment_header($this->question);
if ($this->maxnumber != -1){
$this->noofitems = $this->maxnumber;
} else {
$this->noofitems = 0;
}
//------------------------------------------------------------------------------------------------------------------------------
$mform->addElement('submit', 'updatedatasets', get_string('updatedatasetparam', 'qtype_datasetdependent'));
$mform->addElement('header', 'additemhdr', get_string('itemtoadd', 'qtype_datasetdependent'));
$idx = 1;
$j = (($this->noofitems) * count($this->datasetdefs))+1;
foreach ($this->datasetdefs as $defkey => $datasetdef){
$mform->addElement('text', "number[$j]", get_string('param', 'qtype_datasetdependent', $datasetdef->name));
$this->qtypeobj->custom_generator_tools_part(&$mform, $idx, $j);
$idx++;
$mform->addElement('hidden', "definition[$j]");
$mform->addElement('hidden', "itemid[$j]");
$mform->addElement('static', "divider[$j]", '', '<hr />');
$j++;
}
if ('' != $strquestionlabel){
$mform->addElement('static', 'answercomment['.($this->noofitems+1).']', $strquestionlabel);
}
$mform->closeHeaderBefore('addbutton');
$mform->addElement('submit', 'addbutton', get_string('additem', 'qtype_datasetdependent'));
if ($this->qtypeobj->supports_dataset_item_generation()){
$radiogrp = array();
$radiogrp[] =& $mform->createElement('radio', 'nextpageparam[forceregeneration]', null, get_string('reuseifpossible', 'qtype_datasetdependent'), 0);
$radiogrp[] =& $mform->createElement('radio', 'nextpageparam[forceregeneration]', null, get_string('forceregeneration', 'qtype_datasetdependent'), 1);
$mform->addGroup($radiogrp, 'forceregenerationgrp', get_string('nextitemtoadd', 'qtype_calculated'), null, false);
}
$mform->addElement('submit', 'getnextbutton', get_string('getnextnow', 'qtype_datasetdependent'));
//------------------------------------------------------------------------------------------------------------------------------
$j = $this->noofitems * count($this->datasetdefs);
for ($i = $this->noofitems; $i >= 1 ; $i--){
$mform->addElement('header', '', get_string('itemno', 'qtype_datasetdependent', $i));
foreach ($this->datasetdefs as $defkey => $datasetdef){
$mform->addElement('text', "number[$j]", get_string('param', 'qtype_datasetdependent', $datasetdef->name));
$mform->addElement('hidden', "itemid[$j]");
$mform->addElement('hidden', "definition[$j]");
$j--;
}
if ('' != $strquestionlabel){
$repeated[] =& $mform->addElement('static', "answercomment[$i]", $strquestionlabel);
}
if ($i == $this->noofitems) {//last item
$mform->addElement('submit', 'deletebutton', get_string('deletelastitem', 'qtype_datasetdependent'));
}
}
$mform->setType('number', PARAM_NUMBER);
$mform->setType('itemid', PARAM_INT);
$mform->setType('definition', PARAM_NOTAGS);
//------------------------------------------------------------------------------------------------------------------------------
//non standard name for button element needed so not using add_action_buttons
$mform->addElement('submit', 'backtoquiz', get_string('savechanges'));
$mform->closeHeaderBefore('backtoquiz');
//hidden elements
$mform->addElement('hidden', 'returnurl');
$mform->setType('returnurl', PARAM_URL);
$mform->addElement('hidden', 'qtype');
$mform->setType('qtype', PARAM_ALPHA);
$mform->addElement('hidden', 'category');
$mform->setType('category', PARAM_INT);
$mform->addElement('hidden', 'courseid');
$mform->setType('courseid', PARAM_INT);
$mform->setDefault('courseid', 0);
$mform->addElement('hidden', 'cmid');
$mform->setType('cmid', PARAM_INT);
$mform->setDefault('cmid', 0);
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
$mform->addElement('hidden', 'wizard', 'datasetitems');
$mform->setType('wizard', PARAM_ALPHA);
}
function set_data($question){
$formdata = array();
//fill out all data sets and also the fields for the next item to add.
$j = $this->noofitems * count($this->datasetdefs);
for ($itemnumber = $this->noofitems; $itemnumber >= 1; $itemnumber--){
$data = array();
foreach ($this->datasetdefs as $defid => $datasetdef){
if (isset($datasetdef->items[$itemnumber])){
$formdata["number[$j]"] = $datasetdef->items[$itemnumber]->value;
$formdata["definition[$j]"] = $defid;
$formdata["itemid[$j]"] = $datasetdef->items[$itemnumber]->id;
$data[$datasetdef->name] = $datasetdef->items[$itemnumber]->value;
}
$j--;
}
$formdata['answercomment['.$itemnumber.']'] = $this->qtypeobj->comment_on_datasetitems($this->question, $data, $itemnumber);
}
$formdata['nextpageparam[forceregeneration]'] = $this->regenerate;
$j = $this->noofitems * count($this->datasetdefs)+1;
$data = array(); // data for comment_on_datasetitems later
//dataset generation dafaults
if ($this->qtypeobj->supports_dataset_item_generation()) {
$itemnumber = $this->noofitems+1;
foreach ($this->datasetdefs as $defid => $datasetdef){
$formdata["number[$j]"] = $this->qtypeobj->generate_dataset_item($datasetdef->options);
$formdata["definition[$j]"] = $defid;
$formdata["itemid[$j]"] =
isset($datasetdef->items[$itemnumber])?$datasetdef->items[$itemnumber]->id:0;
$data[$datasetdef->name] = $formdata["number[$j]"];
$j++;
}
}
//existing records override generated data depending on radio element
$j = $this->noofitems * count($this->datasetdefs)+1;
if (!$this->regenerate){
$idx = 1;
$itemnumber = $this->noofitems+1;
foreach ($this->datasetdefs as $defid => $datasetdef){
if (isset($datasetdef->items[$itemnumber])){
$formdata["number[$j]"] = $datasetdef->items[$itemnumber]->value;
$formdata["definition[$j]"] = $defid;
$formdata["itemid[$j]"] = $datasetdef->items[$itemnumber]->id;
$data[$datasetdef->name] = $datasetdef->items[$itemnumber]->value;
}
$j++;
}
}
//default answercomment will get ignored if answer element is not in the form.
$formdata['answercomment['.($this->noofitems+1).']'] = $this->qtypeobj->comment_on_datasetitems($this->question, $data, ($this->noofitems+1));
$formdata = $this->qtypeobj->custom_generator_set_data($this->datasetdefs, $formdata);
parent::set_data((object)($formdata + (array)$question));
}
function validation($data){
$errors = array();
if (isset($data['backtoquiz']) && ($this->noofitems==0)){
$errors['addbutton'] = get_string('youmustaddatleastoneitem', 'qtype_datasetdependent');
}
return $errors;
}
}
?>
-102
View File
@@ -1,102 +0,0 @@
<?php
/**
* Defines the editing form for the match question type.
*
* @copyright &copy; 2007 Jamie Pratt
* @author Jamie Pratt me@jamiep.org
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package questionbank
* @subpackage questiontypes
*/
/**
* match editing form definition.
*/
class question_edit_match_form extends question_edit_form {
/**
* Add question-type specific form fields.
*
* @param object $mform the form being built.
*/
function definition_inner(&$mform) {
$mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffle', 'quiz'), null, null, array(0,1));
$mform->setHelpButton('shuffleanswers', array('matchshuffle', get_string('shuffle','quiz'), 'quiz'));
$mform->setDefault('shuffleanswers', 1);
$mform->addElement('static', 'answersinstruct', get_string('choices', 'quiz'), get_string('filloutthreequestions', 'quiz'));
$mform->closeHeaderBefore('answersinstruct');
$repeated = array();
$repeated[] =& $mform->createElement('header', 'choicehdr', get_string('questionno', 'quiz', '{no}'));
$repeated[] =& $mform->createElement('textarea', 'subquestions', get_string('question', 'quiz'), array('cols'=>40, 'rows'=>3));
$repeated[] =& $mform->createElement('text', 'subanswers', get_string('answer', 'quiz'), array('size'=>50));
if (isset($this->question->options)){
$countsubquestions = count($this->question->options->subquestions);
} else {
$countsubquestions = 0;
}
if ($this->question->formoptions->repeatelements){
$repeatsatstart = (QUESTION_NUMANS_START > ($countsubquestions + QUESTION_NUMANS_ADD))?
QUESTION_NUMANS_START : ($countsubquestions + QUESTION_NUMANS_ADD);
} else {
$repeatsatstart = $countsubquestions;
}
$mform->setType('subanswer', PARAM_TEXT);
$mform->setType('subquestion', PARAM_TEXT);
$this->repeat_elements($repeated, $repeatsatstart, array(), 'noanswers', 'addanswers', QUESTION_NUMANS_ADD, get_string('addmoreqblanks', 'qtype_match'));
}
function set_data($question) {
if (isset($question->options)){
$subquestions = $question->options->subquestions;
if (count($subquestions)) {
$key = 0;
foreach ($subquestions as $subquestion){
$default_values['subanswers['.$key.']'] = $subquestion->answertext;
$default_values['subquestions['.$key.']'] = $subquestion->questiontext;
$key++;
}
}
$default_values['shuffleanswers'] = $question->options->shuffleanswers;
$question = (object)((array)$question + $default_values);
}
parent::set_data($question);
}
function qtype() {
return 'match';
}
function validation($data){
$errors = parent::validation($data);
$answers = $data['subanswers'];
$questions = $data['subquestions'];
$questioncount = 0;
foreach ($questions as $key => $question){
$trimmedquestion = trim($question);
$trimmedanswer = trim($answers[$key]);
if (!empty($trimmedanswer) && !empty($trimmedquestion)){
$questioncount++;
}
if (!empty($trimmedquestion) && empty($trimmedanswer)){
$errors['subanswers['.$key.']'] = get_string('nomatchinganswerforq', 'qtype_match', $trimmedquestion);
}
}
if ($questioncount==0){
$errors['subquestions[0]'] = get_string('notenoughquestions', 'qtype_match', 3);
$errors['subquestions[1]'] = get_string('notenoughquestions', 'qtype_match', 3);
$errors['subquestions[2]'] = get_string('notenoughquestions', 'qtype_match', 3);
} elseif ($questioncount==1){
$errors['subquestions[1]'] = get_string('notenoughquestions', 'qtype_match', 3);
$errors['subquestions[2]'] = get_string('notenoughquestions', 'qtype_match', 3);
} elseif ($questioncount==2){
$errors['subquestions[2]'] = get_string('notenoughquestions', 'qtype_match', 3);
}
return $errors;
}
}
?>
+21 -7
View File
@@ -513,16 +513,30 @@ class question_match_qtype extends default_questiontype {
//Extract the match_sub for the question and the answer
$exploded = explode("-",$tok);
$match_question_id = $exploded[0];
$match_answer_code = $exploded[1];
$match_answer_id = $exploded[1];
//Get the match_sub from backup_ids (for the question)
if (!$match_que = backup_getid($restore->backup_unique_code,"question_match_sub",$match_question_id)) {
echo 'Could not recode question_match_sub '.$match_question_id.'<br />';
echo 'Could not recode question in question_match_sub '.$match_question_id.'<br />';
}
if ($in_first) {
$answer_field .= $match_que->new_id."-".$match_answer_code;
$in_first = false;
} else {
$answer_field .= ",".$match_que->new_id."-".$match_answer_code;
//Get the match_sub from backup_ids (for the answer)
if ($match_answer_id) { // only recode answer if not 0, not answered yet
if (!$match_ans = backup_getid($restore->backup_unique_code,"question_match_sub",$match_answer_id)) {
echo 'Could not recode answer in question_match_sub '.$match_answer_id.'<br />';
}
}
if ($match_que) {
//If the question hasn't response, it must be 0
if (!$match_ans and $match_answer_id == 0) {
$match_ans->new_id = 0;
}
if ($in_first) {
$answer_field .= $match_que->new_id."-".$match_ans->new_id;
$in_first = false;
} else {
$answer_field .= ",".$match_que->new_id."-".$match_ans->new_id;
}
}
//check for next
$tok = strtok(",");
@@ -1,107 +0,0 @@
<?php
/**
* Defines the editing form for the missingtype question type.
*
* @copyright &copy; 2007 Jamie Pratt
* @author Jamie Pratt me@jamiep.org
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package questionbank
* @subpackage questiontypes
*/
/**
* missingtype editing form definition.
*/
class question_edit_missingtype_form extends question_edit_form {
/**
* Add question-type specific form fields.
*
* @param object $mform the form being built.
*/
function definition_inner(&$mform) {
$creategrades = get_grade_options();
$gradeoptions = $creategrades->gradeoptionsfull;
$repeated = array();
$repeated[] =& $mform->createElement('header', 'choicehdr', get_string('choiceno', 'qtype_multichoice', '{no}'));
$repeated[] =& $mform->createElement('text', 'answer', get_string('answer', 'quiz'));
$repeated[] =& $mform->createElement('select', 'fraction', get_string('grade'), $gradeoptions);
$repeated[] =& $mform->createElement('htmleditor', 'feedback', get_string('feedback', 'quiz'));
if (isset($this->question->options)){
$countanswers = count($this->question->options->answers);
} else {
$countanswers = 0;
}
if ($this->question->formoptions->repeatelements){
$repeatsatstart = (QUESTION_NUMANS_START > ($countanswers + QUESTION_NUMANS_ADD))?
QUESTION_NUMANS_START : ($countanswers + QUESTION_NUMANS_ADD);
} else {
$repeatsatstart = $countanswers;
}
$repeatedoptions = array();
$repeatedoptions['fraction']['default'] = 0;
$mform->setType('answer', PARAM_NOTAGS);
$this->repeat_elements($repeated, $repeatsatstart, $repeatedoptions, 'noanswers', 'addanswers', QUESTION_NUMANS_ADD, get_string('addmorechoiceblanks', 'qtype_multichoice'));
}
function set_data($question) {
if (isset($question->options)){
$answers = $question->options->answers;
if (count($answers)) {
$key = 0;
foreach ($answers as $answer){
$default_values['answer['.$key.']'] = $answer->answer;
$default_values['fraction['.$key.']'] = $answer->fraction;
$default_values['feedback['.$key.']'] = $answer->feedback;
$key++;
}
}
$question = (object)((array)$question + $default_values);
}
parent::set_data($question);
}
function qtype() {
return 'missingtype';
}
function validation($data){
$errors = parent::validation($data);
$answers = $data['answer'];
$answercount = 0;
$totalfraction = 0;
$maxfraction = -1;
foreach ($answers as $key => $answer){
//check no of choices
$trimmedanswer = trim($answer);
if (!empty($trimmedanswer)){
$answercount++;
}
//check grades
if ($answer != '') {
if ($data['fraction'][$key] > 0) {
$totalfraction += $data['fraction'][$key];
}
if ($data['fraction'][$key] > $maxfraction) {
$maxfraction = $data['fraction'][$key];
}
}
}
if ($answercount==0){
$errors['answer[0]'] = get_string('notenoughanswers', 'qtype_multichoice', 1);
}
$totalfraction = round($totalfraction, 2);
if ($totalfraction != 1) {
$totalfraction = $totalfraction * 100;
$errors['fraction[0]'] = get_string('errfractionsaddwrong', 'qtype_multichoice', $totalfraction);
}
return $errors;
}
}
?>
+2 -1
View File
@@ -478,7 +478,8 @@ class default_questiontype {
$commentlink = '';
if (isset($options->questioncommentlink)) {
$strcomment = get_string('commentorgrade', 'quiz');
$commentlink = '<div class="commentlink">'.link_to_popup_window ($options->questioncommentlink.'?attempt='.$state->attempt.'&amp;question='.$question->id,
$question_to_comment = isset($question->randomquestionid) ? $question->randomquestionid : $question->id;
$commentlink = '<div class="commentlink">'.link_to_popup_window ($options->questioncommentlink.'?attempt='.$state->attempt.'&amp;question='.$question_to_comment,
'commentquestion', $strcomment, 450, 650, $strcomment, 'none', true).'</div>';
}
+44
View File
@@ -212,6 +212,7 @@ class random_qtype extends default_questiontype {
function print_question(&$question, &$state, &$number, $cmoptions, $options) {
global $QTYPES;
$wrappedquestion = &$state->options->question;
$wrappedquestion->randomquestionid = $question->id;
$QTYPES[$wrappedquestion->qtype]
->print_question($wrappedquestion, $state, $number, $cmoptions, $options);
}
@@ -237,6 +238,49 @@ class random_qtype extends default_questiontype {
->compare_responses($wrappedquestion, $state, $teststate);
}
function restore_recode_answer($state, $restore) {
// The answer looks like 'randomXX-ANSWER', where XX is
// the id of the used question and ANSWER the actual
// response to that question.
// However, there may still be old-style states around,
// which store the id of the wrapped question in the
// state of the random question and store the response
// in a separate state for the wrapped question
global $QTYPES;
$answer_field = "";
if (ereg('^random([0-9]+)-(.*)$', $state->answer, $answerregs)) {
// Recode the question id in $answerregs[1]
// Get the question from backup_ids
if(!$wrapped = backup_getid($restore->backup_unique_code,"question",$answerregs[1])) {
echo 'Could not recode question in random-'.$answerregs[1].'<br />';
return($answer_field);
}
// Get the question type for recursion
if (!$wrappedquestion->qtype = get_field('question', 'qtype', 'id', $wrapped->new_id)) {
echo 'Could not get qtype while recoding question random-'.$answerregs[1].'<br />';
return($answer_field);
}
$newstate = $state;
$newstate->question = $wrapped->new_id;
$newstate->answer = $answerregs[2];
$answer_field = 'random'.$wrapped->new_id.'-';
// Recode the answer field in $answerregs[2] depending on
// the qtype of question with id $answerregs[1]
$answer_field .= $QTYPES[$wrappedquestion->qtype]->restore_recode_answer($newstate, $restore);
} else {
// Handle old-style states
$answer_link = backup_getid($restore->backup_unique_code,"question",$state->answer);
if ($answer_link) {
$answer_field = $answer_link->new_id;
}
}
return $answer_field;
}
}
//// END OF CLASS ////
@@ -1,71 +0,0 @@
<?php
/**
* Defines the editing form for the randomsamatch question type.
*
* @copyright &copy; 2007 Jamie Pratt
* @author Jamie Pratt me@jamiep.org
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package questionbank
* @subpackage questiontypes
*/
/**
* randomsamatch editing form definition.
*/
class question_edit_randomsamatch_form extends question_edit_form {
/**
* Add question-type specific form fields.
*
* @param MoodleQuickForm $mform the form being built.
*/
function definition_inner(&$mform) {
$mform->removeElement('image');
$questionstoselect = array();
for ($i=2; $i<=QUESTION_NUMANS; $i++){
$questionstoselect[$i] = $i;
}
$mform->addElement('select', 'choose', get_string("randomsamatchnumber", "quiz"), $questionstoselect);
$mform->setType('feedback', PARAM_RAW);
$mform->addElement('hidden', 'fraction', 0);
}
function set_data($question) {
if (empty($question->name)) {
$question->name = get_string("randomsamatch", "quiz");
}
if (empty($question->questiontext)) {
$question->questiontext = get_string("randomsamatchintro", "quiz");
}
parent::set_data($question);
}
function qtype() {
return 'randomsamatch';
}
function validation($data){
global $QTYPES;
$errors = parent::validation($data);
$saquestions = $QTYPES['randomsamatch']->get_sa_candidates($data['category']);
$numberavailable = count($saquestions);
if ($saquestions === false){
$a = new object();
$a->catname = get_field('question_categories', 'name', 'id', $data['category']);
$errors['choose'] = get_string('nosaincategory', 'qtype_randomsamatch', $a);
} elseif ($numberavailable < $data['choose']){
$a = new object();
$a->catname = get_field('question_categories', 'name', 'id', $data['category']);
$a->nosaquestions = $numberavailable;
$errors['choose'] = get_string('notenoughsaincategory', 'qtype_randomsamatch', $a);
}
return $errors;
}
}
?>
+8 -6
View File
@@ -306,13 +306,15 @@ class question_truefalse_qtype extends default_questiontype {
}
function restore_recode_answer($state, $restore) {
$answer = backup_getid($restore->backup_unique_code,"question_answers",$state->answer);
if ($answer) {
return $answer->new_id;
} else {
echo 'Could not recode truefalse answer id '.$state->answer.' for state '.$oldid.'<br />';
//answer may be empty
if ($state->answer) {
$answer = backup_getid($restore->backup_unique_code,"question_answers",$state->answer);
if ($answer) {
return $answer->new_id;
} else {
echo 'Could not recode truefalse answer id '.$state->answer.' for state '.$state->oldid.'<br />';
}
}
return '';
}
}
+1
View File
@@ -396,4 +396,5 @@ if (isadmin()) {
</table>
<input type="hidden" name="course" value="<?php p($course->id) ?>" />
<input type="hidden" name="id" value="<?php p($user->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
</form>
+1 -1
View File
@@ -69,7 +69,7 @@
/// If data submitted, then process and store.
if ($usernew = data_submitted()) {
if ($usernew = data_submitted() and confirm_sesskey()) {
if (($USER->id <> $usernew->id) && !isadmin()) {
print_error('onlyeditown');
+2 -2
View File
@@ -68,7 +68,7 @@
$fullmode = false;
}
/// Check to see if groups are being used in this forum
/// Check to see if groups are being used in this course
/// and if so, set $currentgroup to reflect the current group
$groupmode = groupmode($course); // Groups are being used
@@ -82,7 +82,7 @@
!isteacheredit($course->id));
if ($isseparategroups and (!$currentgroup) ) { //XXX
print_heading(get_string("notingroup", "forum"));
print_heading(get_string("notingroup"));
print_footer($course);
exit;
}
+2
View File
@@ -109,6 +109,8 @@
if ($user->deleted) {
print_heading(get_string("userdeleted"));
print_footer($course);
die;
}
/// Get the hidden field list
+2 -2
View File
@@ -6,10 +6,10 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
$version = 2006050560; // YYYYMMDD = date of the 1.6 branch (don't change)
$version = 2006050570; // YYYYMMDD = date of the 1.6 branch (don't change)
// X = release number 1.6.[0,1,2,3...]
// Y = micro-increments between releases
$release = '1.6.6'; // Human-friendly version name
$release = '1.6.7'; // Human-friendly version name
?>