global $CFG, $DB;
$data = (object)$data;
- $coursetags = isset($data->tags['tag']) ? $data->tags['tag'] : array();
- $coursemodules = isset($data->allowed_modules['module']) ? $data->allowed_modules['module'] : array();
$oldid = $data->id; // We'll need this later
$fullname = $this->get_setting_value('course_fullname');
$data->shortname= $shortname;
$data->idnumber = '';
+ // Only restrict modules if original course was and target site too for new courses
+ $data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
+
$data->startdate= $this->apply_date_offset($data->startdate);
if ($data->defaultgroupingid) {
$data->defaultgroupingid = $this->get_mappingid('grouping', $data->defaultgroupingid);
$string['adminaccepts'] = 'Select payment methods allowed and their types';
$string['anauthcode'] = 'Obtain authcode';
$string['anauthcodedesc'] = 'If a user\'s credit card cannot be captured on the internet directly, obtain authorization code over the phone from customer\'s bank.';
-$string['adminauthorizeccapture'] = 'Order Review & Scheduled-Capture Settings';
-$string['adminauthorizeemail'] = 'Email Sending Settings';
-$string['adminauthorizesettings'] = 'Authorize.Net Merchant Account Settings';
-$string['adminauthorizewide'] = 'General Settings';
+$string['adminauthorizeccapture'] = 'Order review and scheduled-capture settings';
+$string['adminauthorizeemail'] = 'Email sending settings';
+$string['adminauthorizesettings'] = 'Authorize.Net merchant account settings';
+$string['adminauthorizewide'] = 'General settings';
$string['anavs'] = 'Address Verification System';
-$string['anavsdesc'] = 'Check this if you have activated Address Verification System (AVS) in your authorize.Net merchant account. This demands address fields like street, state, country and zip when user fills out payment form.';
+$string['anavsdesc'] = 'Check this if you have activated Address Verification System (AVS) in your Authorize.Net merchant account. This demands address fields like street, state, country and zip when user fills out payment form.';
$string['adminconfighttps'] = 'Please ensure that you have "<a href="{$a->url}">turned loginhttps ON</a>" to use this plugin<br />in Admin >> Variables >> Security >> HTTP security.';
$string['adminconfighttpsgo'] = 'Go to the <a href="{$a->url}">secure page</a> to configure this plugin.';
$string['admincronsetup'] = 'The cron.php maintenance script has not been run for at least 24 hours.<br />Cron must be enabled if you want to use scheduled-capture feature.<br /><b>Enable</b> \'Authorize.Net plugin\' and <b>setup cron</b> properly; or <b>uncheck an_review</b> again.<br />If you disable scheduled-capture, transactions will be cancelled unless you review them within 30 days.<br />Check <b>an_review</b> and enter <b>\'0\' to an_capture_day</b> field<br />if you want to <b>manually</b> accept/deny payments within 30 days.';
$string['anemailexpired'] = 'Expiry notification';
-$string['anemailexpireddesc'] = 'This is useful for \'Manual-Capture\'. Admins are notified the specified amount of days prior to pending orders expiring.';
+$string['anemailexpireddesc'] = 'This is useful for \'manual-capture\'. Admins are notified the specified amount of days prior to pending orders expiring.';
$string['adminemailexpiredsort'] = 'When the number of pending orders expiring are sent to the teachers via email, which one is important?';
$string['adminemailexpiredsortcount'] = 'Order count';
$string['adminemailexpiredsortsum'] = 'Total amount';
$string['anemailexpiredteacher'] = 'Expiry notification - Teacher';
$string['anemailexpiredteacherdesc'] = 'If you have enabled manual-capture (see above) and teachers can manage the payments, they may also notified about pending orders expiring. This will send an email to each course teachers about the count of the pending orders to expire.';
$string['adminemailexpsetting'] = '(0=disable sending email, default=2, max=5)<br />(Manual capture settings for sending email: cron=enabled, an_review=checked, an_capture_day=0, an_emailexpired=1-5)';
-$string['adminhelpcapturetitle'] = 'Scheduled-Capture Day';
-$string['adminhelpreviewtitle'] = 'Order Review';
+$string['adminhelpcapturetitle'] = 'Scheduled-capture day';
+$string['adminhelpreviewtitle'] = 'Order review';
$string['adminneworder'] = 'Dear Admin,
You have received a new pending order:
You can also accept/deny the payment to enrol the student immediately following this link:
{$a->url}';
-$string['adminnewordersubject'] = '{$a->course}; New Pending Order: {$a->orderid}';
-$string['adminpendingorders'] = 'You have disabled scheduled-capture feature.<br />Total {$a->count} transactions with the status of \'Authorized/Pending Capture\' are to be cancelled unless you check them.<br />To accept/deny payments, go to <a href=\'{$a->url}\'>Payment Management</a> page.';
+$string['adminnewordersubject'] = '{$a->course}: New pending order: {$a->orderid}';
+$string['adminpendingorders'] = 'You have disabled scheduled-capture feature.<br />Total {$a->count} transactions with the status of \'Authorized/Pending capture\' are to be cancelled unless you check them.<br />To accept/deny payments, go to <a href=\'{$a->url}\'>Payment Management</a> page.';
$string['anreview'] = 'Review';
$string['anreviewdesc'] = 'Review order before processing the credit card.';
$string['adminteachermanagepay'] = 'Teachers can manage the payments of the course.';
-$string['allpendingorders'] = 'All Pending Orders';
+$string['allpendingorders'] = 'All pending orders';
$string['amount'] = 'Amount';
$string['anlogin'] = 'Authorize.Net: Login name';
$string['anpassword'] = 'Authorize.Net: Password';
$string['anreferer'] = 'Referer';
-$string['anrefererdesc'] = 'Define the URL referer if you have set up this in your authorize.Net merchant account. This will send a line "Referer: URL" embedded in the web request.';
+$string['anrefererdesc'] = 'Define the URL referer if you have set up this in your Authorize.Net merchant account. This will send a line "Referer: URL" embedded in the web request.';
$string['antestmode'] = 'Test mode';
$string['antestmodedesc'] = 'Run transactions in test mode only (no money will be drawn)';
-$string['antrankey'] = 'Authorize.Net: Transaction Key';
-$string['approvedreview'] = 'Approved Review';
+$string['antrankey'] = 'Authorize.Net: Transaction key';
+$string['approvedreview'] = 'Approved review';
$string['authcaptured'] = 'Authorized / Captured';
-$string['authcode'] = 'Authorization Code';
-$string['authorizedpendingcapture'] = 'Authorized / Pending Capture';
-$string['authorizeerror'] = 'Authorize.Net Error: {$a}';
+$string['authcode'] = 'Authorization code';
+$string['authorizedpendingcapture'] = 'Authorized / Pending capture';
+$string['authorizeerror'] = 'Authorize.Net error: {$a}';
$string['avsa'] = 'Address (street) matches, postal code does not';
$string['avsb'] = 'Address information not provided';
-$string['avse'] = 'Address Verification System Error';
-$string['avsg'] = 'Non-U.S. Card Issuing Bank';
+$string['avse'] = 'Address Verification System error';
+$string['avsg'] = 'Non-U.S. card issuing bank';
$string['avsn'] = 'No match on address (street) nor postal code';
$string['avsp'] = 'Address Verification System not applicable';
-$string['avsr'] = 'Retry - System unavailable or timed out';
-$string['avsresult'] = 'AVS Result: {$a}';
+$string['avsr'] = 'Retry - system unavailable or timed out';
+$string['avsresult'] = 'AVS result: {$a}';
$string['avss'] = 'Service not supported by issuer';
$string['avsu'] = 'Address information is unavailable';
$string['avsw'] = '9 digit postal code matches, address (street) does not';
$string['canbecredit'] = 'Can be refunded to {$a->upto}';
$string['cancelled'] = 'Cancelled';
$string['capture'] = 'Capture';
-$string['capturedpendingsettle'] = 'Captured / Pending Settlement';
+$string['capturedpendingsettle'] = 'Captured / Pending settlement';
$string['capturedsettled'] = 'Captured / Settled';
$string['captureyes'] = 'The credit card will be captured and the student will be enrolled to the course. Are you sure?';
-$string['ccexpire'] = 'Expiry Date';
+$string['ccexpire'] = 'Expiry date';
$string['ccexpired'] = 'The credit card has expired';
$string['ccinvalid'] = 'Invalid card number';
$string['cclastfour'] = 'CC last four';
-$string['ccno'] = 'Credit Card Number';
-$string['cctype'] = 'Credit Card Type';
-$string['ccvv'] = 'Card Verification';
+$string['ccno'] = 'Credit card number';
+$string['cctype'] = 'Credit card type';
+$string['ccvv'] = 'Card verification';
$string['ccvvhelp'] = 'Look at the back of card (last 3 digits)';
$string['costdefaultdesc'] = '<strong>In course settings, enter -1</strong> to use this default cost to course cost field.';
$string['cutofftime'] = 'Cut-off time';
-$string['cutofftimedesc'] = 'Transaction Cut-Off Time. When the last transaction is picked up for settlement?';
+$string['cutofftimedesc'] = 'Transaction cut-off time. When the last transaction is picked up for settlement?';
$string['dataentered'] = 'Data entered';
$string['delete'] = 'Destroy';
$string['description'] = 'The Authorize.Net module allows you to set up paid courses via payment providers. Two ways to set the course cost (1) a site-wide cost as a default for the whole site or (2) a course setting that you can set for each course individually. The course cost overrides the site cost.';
-$string['echeckabacode'] = 'Bank ABA Number';
-$string['echeckaccnum'] = 'Bank Account Number';
-$string['echeckacctype'] = 'Bank Account Type';
-$string['echeckbankname'] = 'Bank Name';
-$string['echeckbusinesschecking'] = 'Business Checking';
-$string['echeckfirslasttname'] = 'Bank Account Owner';
+$string['echeckabacode'] = 'Bank ABA number';
+$string['echeckaccnum'] = 'Bank account number';
+$string['echeckacctype'] = 'Bank account type';
+$string['echeckbankname'] = 'Bank name';
+$string['echeckbusinesschecking'] = 'Business checking';
+$string['echeckfirslasttname'] = 'Bank account owner';
$string['echeckchecking'] = 'Checking';
$string['echecksavings'] = 'Savings';
-$string['enrolname'] = 'Authorize.Net Payment Gateway';
+$string['enrolname'] = 'Authorize.Net payment gateway';
$string['expired'] = 'Expired';
$string['haveauthcode'] = 'I have already an authorization code';
$string['howmuch'] = 'How much?';
$string['isbusinesschecking'] = 'Is business checking?';
$string['logindesc'] = 'This option must be ON. <br /><br />Please ensure that you have turned <a href="{$a->url}">loginhttps ON</a> in Admin >> Variables >> Security.<br /><br />Turning this on will make Moodle use a secure https connection just for the login and payment pages.';
$string['logininfo'] = 'When configuring your Authorize.Net account, the login name is required and you must enter <strong>either</strong> the transaction key <strong>or</strong> the password in the appropriate box. We recommend you enter the transaction key due to security precautions.';
-$string['methodcc'] = 'Credit Card';
-$string['methodccdesc'] = 'Select Credit Card and accepted types below';
+$string['methodcc'] = 'Credit card';
+$string['methodccdesc'] = 'Select credit card and accepted types below';
$string['methodecheck'] = 'eCheck (ACH)';
$string['methodecheckdesc'] = 'Select eCheck and accepted types below';
$string['missingaba'] = 'Missing ABA number';
$string['missingcvv'] = 'Missing verification number';
$string['missingzip'] = 'Missing postal code';
$string['mypaymentsonly'] = 'Show my payments only';
-$string['nameoncard'] = 'Name on Card';
+$string['nameoncard'] = 'Name on card';
$string['new'] = 'New';
$string['noreturns'] = 'No returns!';
$string['notsettled'] = 'Not settled';
-$string['orderdetails'] = 'Order Details';
+$string['orderdetails'] = 'Order details';
$string['orderid'] = 'OrderID';
-$string['paymentmanagement'] = 'Payment Management';
-$string['paymentmethod'] = 'Payment Method';
+$string['paymentmanagement'] = 'Payment management';
+$string['paymentmethod'] = 'Payment method';
$string['paymentpending'] = 'Your payment is pending for this course with this order number {$a->orderid}. See <a href=\'{$a->url}\'>Order Details</a>.';
$string['pendingecheckemail'] = 'Dear manager,
$string['reason246'] = 'This eCheck type is not allowed.';
$string['reason27'] = 'The transaction resulted in an AVS mismatch. The address provided does not match billing address of cardholder.';
$string['reason28'] = 'The merchant does not accept this type of credit card.';
-$string['reason30'] = 'The configuration with the processor is invalid. Call Merchant Service Provider.';
+$string['reason30'] = 'The configuration with the processor is invalid. Call merchant service provider.';
$string['reason39'] = 'The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn\'t have an exchange rate.';
-$string['reason43'] = 'The merchant was incorrectly set up at the processor. Call your Merchant Service Provider.';
-$string['reason44'] = 'This transaction has been declined. Card Code filter error!';
-$string['reason45'] = 'This transaction has been declined. Card Code / AVS filter error!';
+$string['reason43'] = 'The merchant was incorrectly set up at the processor. Call your merchant service provider.';
+$string['reason44'] = 'This transaction has been declined. Card code filter error!';
+$string['reason45'] = 'This transaction has been declined. Card code / AVS filter error!';
$string['reason47'] = 'The amount requested for settlement may not be greater than the original amount authorized.';
$string['reason5'] = 'A valid amount is required.';
$string['reason50'] = 'This transaction is awaiting settlement and cannot be refunded.';
$string['returns'] = 'Returns';
$string['ancaptureday'] = 'Capture day';
$string['ancapturedaydesc'] = 'Capture the credit card automatically unless a teacher or administrator review the order within the specified days. CRON MUST BE ENABLED.<br />(0 days means it will disable scheduled-capture, also means teacher or admin review order manually. Transaction will be cancelled if you disable scheduled-capture or unless you review it within 30 days.)';
-$string['reviewfailed'] = 'Review Failed';
+$string['reviewfailed'] = 'Review failed';
$string['reviewnotify'] = 'Your payment will be reviewed. Expect an email within a few days from your teacher.';
-$string['sendpaymentbutton'] = 'Send Payment';
+$string['sendpaymentbutton'] = 'Send payment';
$string['settled'] = 'Settled';
-$string['settlementdate'] = 'Settlement Date';
+$string['settlementdate'] = 'Settlement date';
$string['shopper'] = 'Shopper';
$string['subvoidyes'] = 'The transaction refunded ({$a->transid}) is going to be cancelled and this will cause crediting {$a->amount} to your account. Are you sure?';
$string['tested'] = 'Tested';
$string['testmode'] = '[TEST MODE]';
$string['testwarning'] = 'Capturing/Voiding/Refunding seems working in test mode, but no record was updated or inserted in database.';
$string['transid'] = 'TransactionID';
-$string['underreview'] = 'Under Review';
+$string['underreview'] = 'Under review';
$string['unenrolstudent'] = 'Unenrol student?';
$string['uploadcsv'] = 'Upload a CSV file';
$string['usingccmethod'] = 'Enrol using <a href="{$a->url}"><strong>Credit Card</strong></a>';
$string['usingecheckmethod'] = 'Enrol using <a href="{$a->url}"><strong>eCheck</strong></a>';
-$string['verifyaccount'] = 'Verify your authorize.Net merchant account';
+$string['verifyaccount'] = 'Verify your Authorize.Net merchant account';
$string['verifyaccountresult'] = '<b>Verification result:</b> {$a}';
$string['void'] = 'Void';
$string['voidyes'] = 'The transaction will be cancelled. Are you sure?';
{$a->paymenturl}
{$a->profileurl}';
$string['youcantdo'] = 'You can\'t do this action: {$a->action}';
-$string['zipcode'] = 'Zip Code';
+$string['zipcode'] = 'Zip code';
$string['cost'] = 'Cost';
$string['currency'] = 'Currency';
$string['enrolperiod'] = 'Enrolment period';
$string['extremovedsuspendnoroles'] = "Disabled enrolment and removed roles for user '{\$a->user_username}' in course '{\$a->course_shortname}' (id {\$a->course_id})";
$string['extremovedunenrol'] = "Unenrol user '{\$a->user_username}' from course '{\$a->course_shortname}' (id {\$a->course_id})";
$string['failed'] = "Failed!\n";
-$string['general_options'] = 'General Options';
+$string['general_options'] = 'General options';
$string['group_memberofattribute'] = 'Name of the attribute that specifies which groups a given user or group belongs to (e.g., memberOf, groupMembership, etc.)';
$string['group_memberofattribute_key'] = '\'Member of\' attribute';
$string['host_url'] = 'Specify LDAP host in URL-form like \'ldap://ldap.myorg.com/\' or \'ldaps://ldap.myorg.com/\'';
$string['host_url_key'] = 'Host URL';
$string['idnumber_attribute'] = 'If the group membership contains distinguised names, specify the same attribute you have used for the user \'ID Number\' mapping in the LDAP authentication settings';
-$string['idnumber_attribute_key'] = 'ID Number attribute';
+$string['idnumber_attribute_key'] = 'ID number attribute';
$string['ldap_encoding'] = 'Specify encoding used by LDAP server. Most probably utf-8, MS AD v2 uses default platform encoding such as cp1252, cp1250, etc.';
$string['ldap_encoding_key'] = 'LDAP encoding';
$string['ldap:manage'] = 'Manage LDAP enrol instances';
$string['role_mapping'] = '<p>For each rol that you want to assign from LDAP, you need to specify the list of contexts where the role courses\'s groups are located. Separate different contexts with \';\'.</p><p>You also need to specify the attribute your LDAP server uses to hold the members of a group. Usually \'member\' or \'memberUid\'</p>';
$string['role_mapping_key'] = 'Map roles from LDAP ';
$string['roles'] = 'Role mapping';
-$string['server_settings'] = 'LDAP Server Settings';
+$string['server_settings'] = 'LDAP server settings';
$string['synccourserole'] = "== Synching course '{\$a->idnumber}' for role '{\$a->role_shortname}'\n";
$string['template'] = 'Optional: auto-created courses can copy their settings from a template course';
$string['template_key'] = 'Template';
$string['unassignrolefailed'] = "Failed to unassign role '{\$a->role_shortname}' to user '{\$a->user_username}' from course '{\$a->course_shortname}' (id {\$a->course_id})\n";
$string['updatelocal'] = 'Update local data';
$string['user_attribute'] = 'If the group membership contains distinguised names, specify the attribute used to name/search users. If you are using LDAP authentication, this value should match the attribute specified in the \'ID Number\' mapping in the LDAP authentication plugin';
-$string['user_attribute_key'] = 'ID Number attribute';
+$string['user_attribute_key'] = 'ID number attribute';
$string['user_contexts'] = 'If the group membership contains distinguised names, specify the list of contexts where users are located. Separate different contexts with \';\'. For example: \'ou=users,o=org; ou=others,o=org\'';
$string['user_contexts_key'] = 'Contexts';
$string['user_search_sub'] = 'If the group membership contains distinguised names, specify if the search for users is done in subcontexts too';
$string['user_type_key'] = 'User type';
$string['version'] = 'The version of the LDAP protocol your server is using';
$string['version_key'] = 'Version';
-
$string['assignrole'] = 'Assign role';
$string['businessemail'] = 'PayPal business email';
$string['businessemail_desc'] = 'The email address of your business PayPal account';
-$string['cost'] = 'Enrol Cost';
+$string['cost'] = 'Enrol cost';
$string['costerror'] = 'The enrolment cost is not numeric';
$string['costorkey'] = 'Please choose one of the following methods of enrolment.';
$string['currency'] = 'Currency';
$string['pathshead'] = 'Potvrdit cesty';
$string['pathsrodataroot'] = 'Do datového adresáře nelze zapisovat.';
$string['pathsroparentdataroot'] = 'Do nadřazeného adresáře ({$a->parent}) nelze zapisovat. Datový adresář ({$a->dataroot}) nemůže být tímto průvodcem instalací vytvořen.';
+$string['pathssubdirroot'] = 'Absolutní cesta k adresáři s instalací Moodle';
+$string['pathsunsecuredataroot'] = 'Umístění datového adresáře není bezpečné';
+$string['pathswrongadmindir'] = 'Adresář pro správu serveru (admin) neexistuje';
+$string['phpextension'] = '{$a} PHP rozšíření';
$string['phpversion'] = 'Verze PHP';
$string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).</p>
<p>Nyní používáte PHP verze {$a}.</p>
$string['clitypevaluedefault'] = 'sartu balorea, sakatu Enter-i berezko balorea erabiltzeko ({$a})';
$string['cliunknowoption'] = 'Aukera ezezagunak:{$a}
Mesedez, erabili --laguntza aukera.';
-$string['cliyesnoprompt'] = 'idatzi b(bai esateko) edo e (ez esateko)';
+$string['cliyesnoprompt'] = 'idatzi b (bai esateko) edo e (ez esateko)';
$string['environmentrequireinstall'] = 'derrigorrezkoa da instalatuta etagaituta izatea';
$string['environmentrequireversion'] = '{$a->needed} bertsioa beharrezkoa da eta zu {$a->current} ari zara egikaritzen';
$string['cliincorrectvalueretry'] = 'Valeur incorrecte, veuillez réessayer';
$string['clitypevalue'] = 'type valeur';
$string['clitypevaluedefault'] = 'type valeur, tapez Entrée pour utiliser la valeur par défaut ({$a})';
-$string['cliunknowoption'] = 'Options non reconnues :n {$a}n. Utilisez l\'option --help.';
+$string['cliunknowoption'] = 'Options non reconnues :
+ {$a}.
+Utilisez l\'option --help.';
$string['cliyesnoprompt'] = 'Tapez y (pour oui) ou n (pour non)';
$string['environmentrequireinstall'] = 'doit être installé et activé';
$string['environmentrequireversion'] = 'la version {$a->needed} est requise ; vous utilisez actuellement la version {$a->current}';
*/
$string['cliincorrectvalueerror'] = 'Błąd, niepoprawna wartość "{$a->value}" dla "{$a->option}"';
+$string['cliincorrectvalueretry'] = 'Nieprawidłowa wartość, spróbuj ponownie';
$string['clitypevalue'] = 'typ wartości';
$string['clitypevaluedefault'] = 'typ wartości, naciśnij Enter, aby użyć wartości domyślnej ({$a})';
$string['cliyesnoprompt'] = 'wpisz y (czyli tak) lub n (czyli nie)';
$string['cannotcreatelangdir'] = 'Não é possível criar o directório para pacotes linguísticos';
$string['cannotcreatetempdir'] = 'Não é possível criar o directório temporário';
-$string['cannotdownloadcomponents'] = 'Não é possível descarregar a cópia dos componentes';
-$string['cannotdownloadzipfile'] = 'Não é possível descarregar a cópia do ficheiro ZIP';
-$string['cannotfindcomponent'] = 'Não foi encontrado um componente';
+$string['cannotdownloadcomponents'] = 'Não é possível descarregar componentes';
+$string['cannotdownloadzipfile'] = 'Não é possível descarregar o ficheiro ZIP';
+$string['cannotfindcomponent'] = 'O componente não foi encontrado';
$string['cannotsavemd5file'] = 'Não é possível gravar ficheiro md5';
$string['cannotsavezipfile'] = 'Não é possível gravar ficheiro ZIP';
$string['cannotunzipfile'] = 'Não é possível descompactar ficheiro ZIP';
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['admindirname'] = 'Diretório Admin';
-$string['availablelangs'] = 'Pacotes de idioma disponíveis';
+$string['admindirname'] = 'Diretório admin';
+$string['availablelangs'] = 'Lista de idiomas disponíveis';
$string['chooselanguagehead'] = 'Escolha um idioma';
-$string['chooselanguagesub'] = 'Escolha um idioma a ser usado durante a instalação. Após a instalação você pode definir o idioma principal do site e outros idiomas a serem utilizados pelos usuários.';
+$string['chooselanguagesub'] = 'Por favor, escolha o idioma para a instalação.Este idioma também será utilizado como idioma padrão do site, embora você possa mudar mais tarde.';
$string['clialreadyinstalled'] = 'O arquivo config.php já existe, por favor use admin/cli/upgrade.php, se você quiser atualizar o seu site.';
$string['cliinstallheader'] = 'Programa de instalação por linha de comando do Moodle {$a}';
-$string['databasehost'] = 'Host da Base de Dados.';
-$string['databasename'] = 'Nome da Base de Dados';
+$string['databasehost'] = 'Host da base de dados';
+$string['databasename'] = 'Nome da base de dados';
$string['databasetypehead'] = 'Escolha o driver da base de dados';
-$string['dataroot'] = 'Diretório de Dados';
+$string['dataroot'] = 'Diretório de dados';
$string['dbprefix'] = 'Prefixo das tabelas';
$string['dirroot'] = 'Diretório Moodle';
$string['environmenthead'] = 'Verificando o ambiente ...';
A verificação completa do ambiente é feita antes de cada instalação e atualização.';
$string['errorsinenvironment'] = 'Verificação do Ambiente falhou!';
$string['installation'] = 'Instalação';
-$string['langdownloaderror'] = 'Infelizmente o idioma "{$a}" não foi instalado. A instalação vai continuar em Inglês.';
+$string['langdownloaderror'] = 'Infelizmente não foi possível fazer download do idioma "{$a}". O processo de instalação continuará em Inglês.';
$string['memorylimithelp'] = '<p>O limite de memória do PHP configurado atualmente no seu servidor é de {$a}.</p>
<p>Este limite pode causar problemas no futuro, especialmente quando muitos módulos estiverem ativados ou em caso de um número elevado de usuários.</p>
<p>Alguns servidores não aceitam este procedimento e <b>todas</b> as páginas PHP do servidor ficam bloqueadas ou imprimem mensagens de erro. Neste caso será necessário excluir o arquivo .htaccess .</p>
</li></ol>';
$string['paths'] = 'Caminhos';
-$string['pathserrcreatedataroot'] = 'O Diretório de Dados ({&a->dataroot}) não pode ser criado pelo instalador.';
+$string['pathserrcreatedataroot'] = 'O diretório de dados ({$a->dataroot}) não pode ser criado pelo instalador.';
$string['pathshead'] = 'Confirme os caminhos';
-$string['pathsrodataroot'] = 'O Diretório de Dados raiz não pode ser acessada para escrita.';
-$string['pathsroparentdataroot'] = 'O diretório pai ({$a->parent}) não pode ser escrito. O diretório de dados ({$a->dataroot)) não pode ser criado pelo instalador.';
+$string['pathsrodataroot'] = 'O diretório de dados raiz não pode ser acessado para escrita.';
+$string['pathsroparentdataroot'] = 'O diretório pai ({$a->parent}) não pode ser escrito. O diretório de dados ({$a->dataroot}) não pode ser criado pelo instalador.';
$string['pathssubadmindir'] = 'Alguns poucos webhosts usam /admin como um URL especial para acesso ao painel de controle ou outras coisas. Infelizmente isto conflita com a localizaçao padrão das páginas do administrador Moodle. Você pode corrigir isso renomeando a pasta admin na sua instalação, e colocando esse novo nome aqui. Por exemplo: <em>moodleadmin</em>. Isto irá corrigir os links das páginas do administrador Moodle.';
$string['pathssubdataroot'] = 'Você precisa de um local onde o Moodle possa salvar arquivos enviados. Este diretório deve possuir permissões de leitura e escrita pelo usuário do servidor web
(geralmente \'nobody\' ou \'apache \'), mas não deverá ser acessível diretamente através da web. O instalador irá tentar criá-lo se ele não existir.';
$string['availablelangs'] = 'Доступные языковые пакеты';
$string['chooselanguagehead'] = 'Выберите язык';
$string['chooselanguagesub'] = 'Сейчас необходимо выбрать язык ТОЛЬКО для сообщений во время установки. Язык сайта и пользовательских интерфейсов можно будет указать далее в процессе установки.';
+$string['clialreadyinstalled'] = 'Файл config.php уже существует. Если вы хотите обновить сайт, пожалуйста, используйте скрипт admin/cli/upgrade.php.';
+$string['cliinstallheader'] = 'Программа установки Moodle {$a} в режиме командной строки';
+$string['databasehost'] = 'Сервер баз данных';
+$string['databasename'] = 'Название базы данных';
+$string['databasetypehead'] = 'Выберите драйвер базы данных';
$string['dataroot'] = 'Каталог данных';
$string['dbprefix'] = 'Префикс имён таблиц';
$string['dirroot'] = 'Каталог Moodle';
-$string['environmenthead'] = 'Проверка окружения...';
+$string['environmenthead'] = 'Проверка среды...';
+$string['environmentsub2'] = 'У каждой версии Moodle есть минимальные требования к версии PHP и набор обязательных расширений PHP.\r
+Полная проверка среды осуществляется перед каждой установкой и обновлением.\r
+Пожалуйста, свяжитесь с администратором сервера, если не знаете, как установить новую версию или включить расширения PHP.';
$string['installation'] = 'Установка';
$string['langdownloaderror'] = 'К несчастью, не удалось установить язык "{$a}". Процесс установки продолжится на английском.';
$string['memorylimithelp'] = '<p>Сейчас ограничение памяти в PHP на Вашем сервере установлено в {$a}.</p>
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>Тем не менее, на некоторых серверах из-за этого могут перестать работать <b>все</b> страницы PHP (Вы увидите ошибки на страницах). В этом случае файл придётся удалить файл .htaccess.</p></li>
</ol>';
+$string['paths'] = 'Пути';
+$string['pathserrcreatedataroot'] = 'Программа установки не может создать каталог данных ({$a->dataroot}).';
+$string['pathshead'] = 'Подтвердите пути';
+$string['pathsrodataroot'] = 'Каталог данных недоступен для записи.';
+$string['pathsroparentdataroot'] = 'Родительский каталог ({$a->parent}) не доступен для записи. Программа установки не может создать каталог данных ({$a->dataroot}).';
+$string['pathssubadmindir'] = 'На небольшом числе веб-хостингов путь /admin используется для доступа к панели управления или чему-то еще. К сожалению, это противоречит стандартному расположению страниц управления Moodle. Это можно исправить путем переименования папки admin в каталоге Moodle и указания нового имени здесь. Например: <em>moodleadmin</em>. При этом все ссылки на панель управления Moodle исправятся автоматически.';
+$string['pathssubdataroot'] = 'Необходимо указать место, где Moodle будет хранить загружаемые файлы. Этот каталог должен быть доступен для чтения и ЗАПИСИ тому пользователю, от чьего имени запускается веб-сервер (обычно \'nobody\' или \'apache\'), но при этом не должен быть доступен напрямую через Интернет. Программа установки попробует создать этот каталог, если он не существует.';
+$string['pathssubdirroot'] = 'Полный путь к каталогу установки Moodle.';
+$string['pathssubwwwroot'] = 'Полный веб-адрес, по которому будет доступен Moodle.
+Использовать для доступа к Moodle несколько публичных адресов невозможно.
+Если у вашего сайта есть еще несколько публичных адресов, вам следует настроить постоянные перенаправления с этих адресов на указанный.
+Если ваш сайт доступен как из Интернета, так и из локальной сети, укажите здесь публичный адрес и настройте DNS таким образом, чтобы этот адрес был доступен и локальным пользователям.
+Если указанный здесь адрес неверный, измените URL в строке адреса браузера, чтобы перезапустить установку с другим значением.';
+$string['pathsunsecuredataroot'] = 'Расположение каталога данных не отвечает требованиям безопасности';
+$string['pathswrongadmindir'] = 'Каталог admin не существует';
+$string['phpextension'] = 'Расширение PHP "{$a}"';
$string['phpversion'] = 'Версия PHP';
$string['phpversionhelp'] = '<p>Для Moodle необходим PHP версии 4.3.0 и выше или 5.1.0 и выше (известны некоторые проблемы с версией 5.0.x).</p>
<p>Сейчас у Вас используется версия {$a}</p>
<blockquote>php_value memory_limit 16M</blockquote>
<p>然而,在一些服务器上这会让<b>所有</b>PHP页面无法正常工作(在访问页面时会有错误),因此您可能不得不删除.htaccess文件。</p></li>
</ol>';
+$string['paths'] = '路径';
$string['pathserrcreatedataroot'] = '安装程序无法建立数据目录({$a->dataroot})。';
+$string['pathshead'] = '确认路径';
$string['pathsrodataroot'] = '数据目录不可写';
$string['pathsroparentdataroot'] = '父目录({$a->parent})不可写。安装程序无法建立数据目录({$a->dataroot})。';
$string['pathssubadmindir'] = '有些网络主机使用/admin这个URL来访问控制面板或其它功能。很不幸,这个设置和Moodle管理页面的标准路径冲突。这个问题可以解决,只需在您的安装目录中把admin目录换名,然后把新名字输入到这里。例如<em>moodleadmin</em>。这么做会改变Moodle中的管理链接。';
$string['pathssubdataroot'] = 'Moodle需要一个位置存放上传的文件。这个目录对于Web服务器用户(通常是“nobody”或“apache”)应当是可读可写的,但应当不能直接通过Web访问它。如果它不存在,安装程序会尝试建立。';
-$string['pathssubdirroot'] = 'moodle安装的完整路径。';
-$string['pathssubwwwroot'] = 'moodle的完整网址。
+$string['pathssubdirroot'] = 'Moodle安装的完整路径。';
+$string['pathssubwwwroot'] = '可以访问到Moodle的完整网址。
Moodle不支持通过多个地址访问。如果您的网站有多个公开地址,您必须把这个地址以外的所有地址都设为永久重定向。如果您的网站既可以通过内部地址访问,也可以通过这个公开地址访问,那么请配置DNS使内部网用户也能使用公开地址。如果此地址不正确,请在浏览器中修改URL来重新安装,并设定另一个地址。';
$string['pathsunsecuredataroot'] = '数据目录所在位置不安全';
$string['pathswrongadmindir'] = '管理目录不存在';
*/
private function get_cached_grade_score($gradeitemid, $grabthelot=false, $userid=0) {
global $USER, $DB, $SESSION;
- if ($userid==0 || $userid=$USER->id) {
+ if ($userid==0 || $userid==$USER->id) {
// For current user, go via cache in session
if (empty($SESSION->gradescorecache) || $SESSION->gradescorecacheuserid!=$USER->id) {
$SESSION->gradescorecache = array();
if (strpos($agent, 'AppleWebKit') === false) {
return false;
}
- // Look for AppleWebKit, excluding strings with OmniWeb, Shiira and SimbianOS and any other mobile devices
+ // Look for AppleWebKit, excluding strings with OmniWeb, Shiira and SymbianOS and any other mobile devices
if (strpos($agent, 'OmniWeb')) { // Reject OmniWeb
return false;
}
if (strpos($agent, 'Shiira')) { // Reject Shiira
return false;
}
- if (strpos($agent, 'SimbianOS')) { // Reject SimbianOS
+ if (strpos($agent, 'SymbianOS')) { // Reject SymbianOS
return false;
}
if (strpos($agent, 'Android')) { // Reject Androids too
if ($countstrangers && ($countonlinecontacts + $countofflinecontacts == 0)) { // Extra help
echo html_writer::tag('div','('.get_string('addsomecontactsincoming', 'message').')',array('class' => 'note'));
}
-
- /*if ($refresh) {
- $PAGE->requires->js_init_call('M.core_message.init_refresh_page', array(60*1000, $PAGE->url->out(false)));
-
- echo $OUTPUT->container_start('messagejsautorefresh note center');
- echo get_string('pagerefreshes', 'message', $CFG->message_contacts_refresh);
- echo $OUTPUT->container_end();
-
- echo $OUTPUT->container_start('messagejsmanualrefresh aligncenter');
- echo $OUTPUT->single_button(message_remove_url_params($PAGE->url), get_string('refresh'));
- echo $OUTPUT->container_end();
- }*/
}
/**
$combinedsearchstring = '';
}
- //$PAGE->requires->js_init_call('M.core_message.init_search_page', array($combinedsearchstring));
-
if ($doingsearch) {
if ($advancedsearch) {
}
}
-/*function message_print_settings() {
- global $USER, $OUTPUT, $PAGE;
-
- if ($frm = data_submitted() and confirm_sesskey()) {
-
- $pref = array();
- $pref['message_beepnewmessage'] = (isset($frm->beepnewmessage)) ? '1' : '0';
- $pref['message_blocknoncontacts'] = (isset($frm->blocknoncontacts)) ? '1' : '0';
-
- set_user_preferences($pref);
-
- redirect(message_remove_url_params($PAGE->url), get_string('settingssaved', 'message'), 1);
- }
-
- $cbbeepnewmessage = (get_user_preferences('message_beepnewmessage', 0) == '1') ? 'checked="checked"' : '';
- $cbblocknoncontacts = (get_user_preferences('message_blocknoncontacts', 0) == '1') ? 'checked="checked"' : '';
-
- include('settings.html');
-}*/
-
/**
* Get the users recent conversations meaning all the people they've recently
* sent or received a message from plus the most recent message sent to or received from each other user
echo $OUTPUT->notification(get_string('emptysearchstring', 'message'));
}
- //echo '<br />';
- //echo $OUTPUT->single_button(new moodle_url($PAGE->url, array('tab' => 'search')), get_string('newsearch', 'message'));
-
echo html_writer::end_tag('div');
}
'resizable' => true);
$link = new moodle_url('/message/index.php?history='.MESSAGE_HISTORY_ALL."&user=$userid1&id=$userid2$keywords$position");
- //$action = new popup_action('click', $link, "message_history_$userid1", $popupoptions);
$action = null;
$str = $OUTPUT->action_link($link, $fulllink, $action, array('title' => $strmessagehistory));
return true;
}
-/*function message_get_popup_messages($destuserid, $fromuserid=NULL){
- global $DB;
-
- $processor = $DB->get_record('message_processors', array('name' => 'popup'));
-
- $messagesproc = $DB->get_records('message_working', array('processorid' => $processor->id), 'id ASC');
-
- //for every message to process check if it's for current user and process
- $messages = array();
- foreach ($messagesproc as $msgp){
- $query = array('id' => $msgp->unreadmessageid, 'useridto' => $destuserid);
- if ($fromuserid){
- $query['useridfrom'] = $fromuserid;
- }
- if ($message = $DB->get_record('message', $query)){
- $messages[] = $message;
- /// Move the entry to the other table
- $message->timeread = time();
- $messageid = $message->id;
- unset($message->id);
-
- //delete what we've processed and check if can move message
- $DB->delete_records('message_working', array('id' => $msgp->id));
- if ( $DB->count_records('message_working', array('unreadmessageid' => $messageid)) == 0){
- message_mark_message_read($message, time(), true);
- }
- }
- }
- return $messages;
-}*/
-
/**
* marks ALL messages being sent from $fromuserid to $touserid as read
* @param int $touserid the id of the message recipient
* @param array $preferences preferences array
*/
function process_form($form, &$preferences){
- $preferences['message_processor_email_email'] = $form->email_email;
+ if (isset($form->email_email)) {
+ $preferences['message_processor_email_email'] = $form->email_email;
+ }
}
/**
* @param array $preferences preferences array
*/
function process_form($form, &$preferences){
- $preferences['message_processor_jabber_jabberid'] = $form->jabber_jabberid;
+ if (isset($form->jabber_jabberid)) {
+ $preferences['message_processor_jabber_jabberid'] = $form->jabber_jabberid;
+ }
}
/**
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = $posthtml;
$eventdata->smallmessage = '';
+
+ $eventdata->name = 'assignment_updates';
+ $eventdata->component = 'mod_assignment';
+ $eventdata->notification = 1;
+
message_send($eventdata);
}
//if the groupid is given?
if (intval($groupid) > 0) {
if($ignore_empty) {
- $ignore_empty_select = "AND fbc.value != ''";
+ $ignore_empty_select = "AND fbv.value != ''";
}
else {
$ignore_empty_select = "";
$baseurl = new moodle_url('/mod/feedback/show_entries.php');
$baseurl->params(array('id'=>$id, 'do_show'=>$do_show, 'showall'=>$showall));
- $tablecolumns = array('userpic', 'fullname', 'timemodified');
+ $tablecolumns = array('userpic', 'fullname', 'c.timemodified');
$tableheaders = array(get_string('userpic'), get_string('fullnameuser'), get_string('date'));
if(has_capability('mod/feedback:deletesubmissions', $context)) {
$mform = $this->_form;
$contents = $this->_customdata['contents'];
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass;
$options->para = false;
$this->add_action_buttons(null, get_string("pleaseenteryouranswerinthebox", "lesson"));
}
-}
\ No newline at end of file
+}
$lessonid = $this->_customdata['lessonid'];
$contents = $this->_customdata['contents'];
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass;
$options->para = false;
$this->add_action_buttons(null, get_string("pleasematchtheabovepairs", "lesson"));
}
-}
\ No newline at end of file
+}
$attempt = new stdClass();
$attempt->answerid = null;
}
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass;
$options->para = false;
$lessonid = $this->_customdata['lessonid'];
$contents = $this->_customdata['contents'];
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass;
$options->para = false;
$mform = $this->_form;
$contents = $this->_customdata['contents'];
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass;
$options->para = false;
$this->add_action_buttons(null, get_string("pleaseenteryouranswerinthebox", "lesson"));
}
-}
\ No newline at end of file
+}
$mform = $this->_form;
$contents = $this->_customdata['contents'];
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass;
$options->para = false;
$attempt->answerid = null;
}
- $mform->addElement('header', 'pageheader', $OUTPUT->box($contents, 'contents'));
+ $mform->addElement('header', 'pageheader');
+
+ $mform->addElement('html', $OUTPUT->container($contents, 'contents'));
$options = new stdClass();
$options->para = false;
$this->add_action_buttons(null, get_string("pleasecheckoneanswer", "lesson"));
}
-}
\ No newline at end of file
+}
$cell = new html_table_cell();
$cell->colspan = 2;
- $cell->style = 'text-align:center';
+ $cell->style = 'text-align:left';
$cell->text = $page->contents;
$pagetable->data[] = new html_table_row(array($cell));
(!$this->is_preview_user() || $this->attempt->preview);
}
+ /**
+ * Is the current user allowed to review this attempt. This applies when
+ * {@link is_own_attempt()} returns false.
+ * @return bool whether the review should be allowed.
+ */
+ public function is_review_allowed() {
+ if (!$this->has_capability('mod/quiz:viewreports')) {
+ return false;
+ }
+
+ $cm = $this->get_cm();
+ if ($this->has_capability('moodle/site:accessallgroups') ||
+ groups_get_activity_groupmode($cm) != SEPARATEGROUPS) {
+ return true;
+ }
+
+ // Check the users have at least one group in common.
+ $teachersgroups = groups_get_activity_allowed_groups($cm);
+ $studentsgroups = groups_get_all_groups($cm->course, $this->attempt->userid, $cm->groupingid);
+ return $teachersgroups && $studentsgroups &&
+ array_intersect(array_keys($teachersgroups), array_keys($studentsgroups));
+ }
+
/**
* Check the appropriate capability to see whether this user may review their own attempt.
* If not, prints an error.
$string['noquestionsonpage'] = 'Empty page';
$string['noresponse'] = 'No response';
$string['noreview'] = 'You are not allowed to review this quiz';
+$string['noreviewattempt'] = 'You are not allowed to review this attempt.';
$string['noreviewshort'] = 'Not permitted';
$string['noreviewuntil'] = 'You are not allowed to review this quiz until {$a}';
$string['noreviewuntilshort'] = 'Available {$a}';
}
else {
$colname = get_string('user');
- $sql = 'SELECT o.*, u.firstname, u.lastname, u.id as uid
+ $sql = 'SELECT o.*, u.firstname, u.lastname
FROM {quiz_overrides} o JOIN {user} u
ON o.userid = u.id
WHERE o.quiz = ?
if (!$nostudents || ($attemptsmode == QUIZ_REPORT_ATTEMPTS_ALL)) {
// Construct the SQL
- $fields = $DB->sql_concat('u.id', '\'#\'', 'COALESCE(qa.attempt, 0)').' AS uniqueid, ';
+ $fields = $DB->sql_concat('u.id', "'#'", 'COALESCE(qa.attempt, 0)') . ' AS uniqueid,';
if ($qmsubselect) {
- $fields .=
- "(CASE " .
- " WHEN $qmsubselect THEN 1" .
- " ELSE 0 " .
- "END) AS gradedattempt, ";
+ $fields .= "\n(CASE WHEN $qmsubselect THEN 1 ELSE 0 END) AS gradedattempt,";
}
- $fields .='qa.uniqueid AS attemptuniqueid, qa.id AS attempt, ' .
- 'u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, u.imagealt, u.email, '.
- 'qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration ';
+ $fields .= '
+ qa.uniqueid AS attemptuniqueid,
+ qa.id AS attempt,
+ u.id AS userid,
+ u.idnumber,
+ u.firstname,
+ u.lastname,
+ u.picture,
+ u.imagealt,
+ u.email,
+ qa.sumgrades,
+ qa.timefinish,
+ qa.timestart,
+ CASE WHEN qa.timefinish = 0 THEN null
+ WHEN qa.timefinish > qa.timestart THEN qa.timefinish - qa.timestart
+ ELSE 0 END AS duration';
+ // To explain that last bit, in MySQL, qa.timestart and qa.timefinish
+ // are unsigned. Since MySQL 5.5.5, when they introduced strict mode,
+ // subtracting a larger unsigned int from a smaller one gave an error.
+ // Therefore, we avoid doing that. timefinish can be non-zero and less
+ // than timestart when you have two load-balanced servers with very
+ // badly synchronised clocks, and a student does a really quick attempt.
// This part is the same for all cases - join users and quiz_attempts tables
$from = '{user} u ';
$accessmanager = $attemptobj->get_access_manager(time());
$options = $attemptobj->get_review_options();
-/// Permissions checks for normal users who do not have quiz:viewreports capability.
- if (!$attemptobj->has_capability('mod/quiz:viewreports')) {
- /// Can't review other users' attempts.
- if (!$attemptobj->is_own_attempt()) {
- quiz_error($attemptobj->get_quiz(), 'notyourattempt');
- }
- /// Can't review during the attempt - send them back to the attempt page.
+ // Check permissions.
+ if ($attemptobj->is_own_attempt()) {
if (!$attemptobj->is_finished()) {
redirect($attemptobj->attempt_url(0, $page));
- }
- /// Can't review unless Students may review -> Responses option is turned on.
- if (!$options->responses) {
+ } else if (!$options->responses) {
$accessmanager->back_to_view_page($attemptobj->is_preview_user(),
- $accessmanager->cannot_review_message($options));
+ $accessmanager->cannot_review_message($attemptobj->get_attempt_state()));
}
+
+ } else if (!$attemptobj->is_review_allowed()) {
+ throw new moodle_quiz_exception($attemptobj, 'noreviewattempt');
}
/// Load the questions and states needed by this page.
$accessmanager = $attemptobj->get_access_manager(time());
$options = $attemptobj->get_review_options();
-/// Permissions checks for normal users who do not have quiz:viewreports capability.
- if (!$attemptobj->has_capability('mod/quiz:viewreports')) {
- /// Can't review during the attempt - send them back to the attempt page.
+ // Check permissions.
+ if ($attemptobj->is_own_attempt()) {
if (!$attemptobj->is_finished()) {
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('cannotreviewopen', 'quiz'));
echo $OUTPUT->close_window_button();
echo $OUTPUT->footer();
die;
- }
- /// Can't review other users' attempts.
- if (!$attemptobj->is_own_attempt()) {
- echo $OUTPUT->header();
- echo $OUTPUT->notification(get_string('notyourattempt', 'quiz'));
- echo $OUTPUT->close_window_button();
- echo $OUTPUT->footer();
- die;
- }
-
- /// Can't review unless Students may review -> Responses option is turned on.
- if (!$options->responses) {
+ } else if (!$options->responses) {
$accessmanager = $attemptobj->get_access_manager(time());
echo $OUTPUT->header();
echo $OUTPUT->notification($accessmanager->cannot_review_message($attemptobj->get_review_options()));
echo $OUTPUT->footer();
die;
}
+
+ } else if (!$attemptobj->is_review_allowed()) {
+ throw new moodle_quiz_exception($attemptobj, 'noreviewattempt');
}
/// Load the questions and states.
*/
$string['apikey'] = 'API key';
-$string['err_noapikey'] = 'No API Key';
-$string['err_noapikey_help'] = 'There is no API Key configured for this plugin. You can get one of these from http://enabled.box.net';
+$string['err_noapikey'] = 'No API key';
+$string['err_noapikey_help'] = 'There is no API key configured for this plugin. You can get one of these from OpenBox development page.';
$string['existingfolder'] = 'Existing folder to put file(s) into';
$string['folderclash'] = 'The folder you asked to create already exists!';
$string['foldercreatefailed'] = 'Failed to create your target folder on box.net';
$string['apikey'] = 'API key';
$string['contenttype'] = 'Content types';
-$string['err_noapikey'] = 'No API Key';
-$string['err_noapikey_help'] = 'There is no API Key configured for this plugin. You can get one of these from http://flickr.com/services/api/keys/apply';
+$string['err_noapikey'] = 'No API key';
+$string['err_noapikey_help'] = 'There is no API key configured for this plugin. You can get one of these from Flickr services page.';
$string['hidefrompublicsearches'] = 'Hide these images from public searches?';
$string['isfamily'] = 'Visible to family';
$string['isfriend'] = 'Visible to friends';
$a = new stdClass();
$a->applyurl = 'http://www.flickr.com/services/api/keys/apply/';
$a->keysurl = 'http://www.flickr.com/services/api/keys/';
- $a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet';
+ $a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=flickr';
$mform->addElement('static', 'setupinfo', get_string('setupinfo', 'portfolio_flickr'),
get_string('setupinfodetails', 'portfolio_flickr', $a));
}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['enableleap2a'] = 'Enable Leap2a Portfolio support (requires Mahara 1.3)';
+$string['enableleap2a'] = 'Enable Leap2A portfolio support (requires Mahara 1.3 or higher)';
$string['err_invalidhost'] = 'Invalid MNet host';
$string['err_invalidhost_help'] = 'This plugin is misconfigured to point to an invalid (or deleted) MNet host. This plugin relies on Moodle Networking peers with SSO IDP published, SSO_SP subscribed, and portfolio subscribed <b>and</b> published.';
-$string['err_networkingoff'] = 'Moodle Networking is off';
-$string['err_networkingoff_help'] = 'Moodle Networking is off entirely. Please enable it before trying to configure this pugin. Any instances of this plugin have been set to not visible until this is fixed - you will need to set them to visible again manully. They cannot be used until this happens';
+$string['err_networkingoff'] = 'MNet is off';
+$string['err_networkingoff_help'] = 'MNet is off entirely. Please enable it before trying to configure this pugin. Any instances of this plugin have been set to not visible until this is fixed - you will need to set them to visible again manully. They cannot be used until this happens';
$string['err_nomnetauth'] = 'The MNet authentication plugin is disabled';
$string['err_nomnetauth_help'] = 'The MNet authentication plugin is disabled, but is required for this service';
-$string['err_nomnethosts'] = 'Relies on Moodle Networking';
-$string['err_nomnethosts_help'] = 'This plugin relies on Moodle Networking peers with SSO IDP published, SSO SP subscribed, portfolio services published <b>and</b> subscribed as well as the MNet authentication plugin. Any instances of this plugin have been hidden until these conditions are met. They will then manually need setting to visible again.';
+$string['err_nomnethosts'] = 'Relies on MNet';
+$string['err_nomnethosts_help'] = 'This plugin relies on MNet peers with SSO IDP published, SSO SP subscribed, portfolio services published <b>and</b> subscribed as well as the MNet authentication plugin. Any instances of this plugin have been hidden until these conditions are met. They will then manually need setting to visible again.';
$string['failedtojump'] = 'Failed to start communication with remote server';
$string['failedtoping'] = 'Failed to start communication with remote server: {$a}';
-$string['mnethost'] = 'MNet Host';
+$string['mnethost'] = 'MNet host';
$string['mnet_nofile'] = 'Could not find file in transfer object - weird error';
$string['mnet_nofilecontents'] = 'Found file in transfer object, but could not get contents - weird error: {$a}';
$string['mnet_noid'] = 'Could not find the matching transfer record for this token';
echo "<th class=\"header\" scope=\"col\"><a href=\"index.php?$sortargs&sort=time\">$strtime</a></th>";
echo "</tr>";
- $maxrating = count($scalemenu);
+ //if the scale was changed after ratings were submitted some ratings may have a value above the current maximum
+ $maxrating = count($scalemenu) - 1;
foreach ($ratings as $rating) {
//Undo the aliasing of the user id column from user_picture::fields()
//we could clone the rating object or preserve the rating id if we needed it again
//but we don't
- $rating->id = $rating->uid;
+ $rating->id = $rating->userid;
echo '<tr class="ratingitemheader">';
echo "<td>";
$sortclause = "ORDER BY $options->sort";
}
- $userfields = user_picture::fields('u', null, 'uid');
+ $userfields = user_picture::fields('u', null, 'userid');
$sql = "SELECT r.id, r.rating, r.itemid, r.userid, r.timemodified, $userfields
FROM {rating} r
LEFT JOIN {user} u ON r.userid = u.id
$string['choosereadme'] = '
<div class="clearfix">
<div class="theme_screenshot">
-
+
<h2>Arialist</h2>
<img src="arialist/pix/screenshot.png" />
-
+
<h3>Theme Discussion Forum:</h3>
<p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p>
-
+
<h3>Theme Credits</h3>
<p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
-
+
<h3>Theme Documentation:</h3>
<p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p>
-
+
<h3>Report a bug:</h3>
<p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p>
</div>
-
+
<div class="theme_description">
-
+
<h2>About</h2>
<p>Arialist is a very clean and simple two-column, fluid-width theme for Moodle 2.0.</p>
-
+
<h2>Tweaks</h2>
<p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it, then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p>
<h2>Credits</h2>
- <p>This theme was coded and is maintained by Patrick Malley of NewSchool Learning. He can be contacted by email at contact@newschoollearning.com. </p>
+ <p>This theme was coded and is maintained by Patrick Malley of NewSchool Learning. He can be contacted by email at contact@newschoollearning.com. </p>
<h2>License</h2>
<p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.
</div>
</div>';
-$string['linkcolor'] = 'Link Color';
+$string['linkcolor'] = 'Link color';
$string['linkcolordesc'] = 'This sets the link color for the theme.';
$string['configtitle'] = 'Arialist settings';
$string['customcss'] = 'Custom CSS';
<p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p>
<h3>Theme Credits</h3>
- <p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
-
+ <p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
+
<h3>Report a bug:</h3>
<p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p>
-
+
</div>
<div class="theme_description">
-
+
<h2>About</h2>
<p>Brick is a two-column, fluid-width theme for Moodle 2.0. You can change the theme color scheme via the theme settings page.</p>
-
+
<h2>Tweaks</h2>
<p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you wish to modify aspects of this theme beyond the settings offered, we advise creating a new theme that uses this theme, Base, and Canvas all as parents. This will ensure updates to any of those themes in the core will find their way into your new theme.</p>
-
+
<h2>Credits</h2>
<p>This theme was coded and is maintained by John Stabinger of NewSchool Learning. He can be contacted by email at contact@newschoollearning.com. </p>
-
+
<h2>License</h2>
<p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.</p>
</div>
</div>';
-$string['configtitle'] = 'Brick Settings';
+$string['configtitle'] = 'Brick settings';
$string['logo'] = 'logo';
$string['logodesc'] = 'Change the logo of this theme by entering the URL to a new one (i.e., http://www.somesite/animage.png). As a reference, the default logo is 265px wide by 60px high. A transparent PNG will work best.';
$string['choosereadme'] = '
<div class="clearfix">
<div class="theme_screenshot">
-
+
<h2>Fusion</h2>
<img src="fusion/pix/screenshot.jpg" />
-
+
<h3>Theme Discussion Forum:</h3>
<p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p>
-
+
<h3>Theme Credits</h3>
<p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
-
+
<h3>Theme Documentation:</h3>
<p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p>
</div>
<div class="theme_description">
-
+
<h2>About</h2>
<p>Fusion is a two-column, fluid-width theme coded for Moodle 2.0. It makes use of custom menus that appear above the site title on every page. It also includes a basic settings page allowing you to change link color, add a tagline above the site name on the front page, and add text to the footer.</p>
-
+
<h2>Parents</h2>
<p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you wish to modify aspects of this theme beyond the settings offered, we advise creating a new theme using this theme, Base and Canvas all as parents so updates to any of those themes in the core will find their way into your new theme.</p>
-
+
<h2>Credits</h2>
<p>This design was originally created by Digital Nature (hello@digitalnature.ro) before being ported to Moodle by Patrick Malley (patrick@newschoollearning.com).
<h2>License</h2>
</div>
</div>';
-$string['linkcolor'] = 'Link Color';
+$string['linkcolor'] = 'Link color';
$string['linkcolordesc'] = 'This sets the link color for the theme.';
$string['configtitle'] = 'Fusion settings';
$string['customcss'] = 'Custom CSS';
$string['taglinedesc'] = 'A short tagline to be displayed under the site name on the front page.<br />';
$string['footertext'] = 'Footertext';
$string['footertextdesc'] = 'Set a footnote or footer text.';
-
// Config
-$string['configtitle'] = 'Nonzero Settings';
+$string['configtitle'] = 'Nonzero settings';
$string['customcss'] = 'Custom CSS';
$string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
$string['regionprewidth'] = 'Left column width';
$string['regionprewidthdesc'] = 'This sets the width of the block region that forms the left column. This column is displayed in the middle of the page while using blog layout';
$string['regionpostwidth'] = 'Right column width';
-$string['regionpostwidthdesc'] = 'This sets the width of the block region that forms the right column.';
\ No newline at end of file
+$string['regionpostwidthdesc'] = 'This sets the width of the block region that forms the right column.';
// Config
-$string['linkcolor'] = 'Link Color';
+$string['linkcolor'] = 'Link color';
$string['linkcolordesc'] = 'This sets the link color for the theme.';
$string['configtitle'] = 'Overlay settings';
$string['customcss'] = 'Custom CSS';
$string['headercolor'] = 'Headercolor';
$string['headercolordesc'] = 'Header background color.';
$string['footertext'] = 'Footertext';
-$string['footertextdesc'] = 'Set a footnote or footer text.';
\ No newline at end of file
+$string['footertextdesc'] = 'Set a footnote or footer text.';
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['choosereadme'] = '<div class="clearfix"><div class="theme_screenshot"><h2>Sky High</h2><img src="sky_high/pix/screenshot.png" /><h3>Theme Discussion Forum:</h3><p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p><h3>Theme Credits</h3><p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p><h3>Theme Documentation:</h3><p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p></div><div class="theme_description"><h2>About</h2><p>Serenity is a fluid-width, three-column theme for Moodle 2.0.<h2>Tweaks</h2><p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p><h2>Credits</h2> <p>This theme was designed by Julian Ridden (julian@moodle.com.au). It was coded and is maintained by John Stabinger of NewSchool Learning (contact@newschoollearning.com). </p><h2>License</h2><p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.</div></div>';
-$string['configtitle'] = 'Sky High Settings';
+$string['configtitle'] = 'Sky High settings';
$string['customcss'] = 'Custom CSS';
$string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
$string['footnote'] = 'Footnote';
$string['logo'] = 'Logo';
$string['logodesc'] = 'Enter the URL to an image to use as the logo for this site. Should be http://www.yoursite.com/path/to/logo.png. The logo should be 50px high.';
$string['regionwidth'] = 'Column width';
-$string['regionwidthdesc'] = 'This sets the width of the two block regions that form the left and right columns.';
\ No newline at end of file
+$string['regionwidthdesc'] = 'This sets the width of the two block regions that form the left and right columns.';
$string['choosereadme'] = '<div class="clearfix"><div class="theme_screenshot"><h2>Splash</h2><img src="splash/pix/screenshot.jpg" /><h3>Theme Discussion Forum:</h3><p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p><h3>Theme Credits</h3><p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p><h3>Theme Documentation:</h3><p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p></div><div class="theme_description"><h2>About</h2><p>Splash is a fluid-width, three-column theme for Moodle 2.0.<h2>Tweaks</h2><p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p><h2>Credits</h2> <p>This theme was coded and is maintained by Caroline Kennedy of Synergy Learning. She can be contacted by email at caroline.kennedy@synergy-learningw.com. </p><h2>License</h2><p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.</div></div>';
-$string['configtitle'] = 'Splash Theme Settings';
+$string['configtitle'] = 'Splash Theme settings';
$string['customcss'] = 'Custom CSS';
$string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
$string['defaulttagline'] = 'Virtual learning center';
$string['footnote'] = 'Footnote';
$string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page. E.g: your copyright info.';
-$string['hide_tagline'] = 'Hide Tagline';
+$string['hide_tagline'] = 'Hide tagline';
$string['hide_taglinedesc'] = 'Check this box to hide the tagline under the logo.';
$string['loginhere'] = 'Login here!';
$string['logo'] = 'Logo';