Skip to content

Commit a554df9

Browse files
committed
Finishing replacing "sarlab" with "enlarge" or "myfrontier"
1 parent 80cc154 commit a554df9

11 files changed

+39
-27
lines changed

block_remlab_manager.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function init() {
5050
public function specialization() {
5151
global $COURSE;
5252

53-
if (!empty($this->config) && !empty($this->config->sarlab_lti_url)) {
54-
$this->sarlabltiurl = $this->config->sarlab_lti_url;
53+
if (!empty($this->config) && !empty($this->config->enlarge_lti_url)) {
54+
$this->enlargeltiurl = $this->config->enlarge_lti_url;
5555
}
5656

5757
$this->urleditlocal = new moodle_url('/blocks/remlab_manager/view.php',
@@ -109,9 +109,9 @@ public function get_content() {
109109
get_string('configure_new_local_experience', 'block_remlab_manager'));
110110
if (get_capability_info('ltisource/enlarge:editexp')) {
111111
if (has_capability('ltisource/enlarge:editexp', $context, $USER->id, false) &&
112-
!empty($this->sarlabltiurl)) {
113-
$this->content->items[4] = html_writer::link($this->sarlabltiurl,
114-
get_string('go_to_sarlab', 'block_remlab_manager'));
112+
!empty($this->enlargeltiurl)) {
113+
$this->content->items[4] = html_writer::link($this->enlargeltiurl,
114+
get_string('go_to_enlarge', 'block_remlab_manager'));
115115
}
116116
}
117117
return $this->content;

classes/task/delete_sarlab_keys.php classes/task/delete_enlarge_keys.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @copyright 2018 Luis de la Torre
3838
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3939
*/
40-
class delete_sarlab_keys extends \core\task\scheduled_task {
40+
class delete_enlarge_keys extends \core\task\scheduled_task {
4141
/**
4242
* Get a descriptive name for this task.
4343
*

db/install.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363
<FIELDS>
6464
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="user"/>
6565
<FIELD NAME="user" TYPE="char" LENGTH="100" NOTNULL="true" UNSIGNED="true" SEQUENCE="false"
66-
PREVIOUS="id" NEXT="sarlabpass"/>
67-
<FIELD NAME="sarlabpass" TYPE="char" LENGTH="40" NOTNULL="true" UNSIGNED="true" SEQUENCE="false"
66+
PREVIOUS="id" NEXT="enlargepass"/>
67+
<FIELD NAME="enlargepass" TYPE="char" LENGTH="40" NOTNULL="true" UNSIGNED="true" SEQUENCE="false"
6868
PREVIOUS="user" NEXT="labmanager"/>
6969
<FIELD NAME="labmanager" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false"
70-
PREVIOUS="sarlabpass" NEXT="creationtime"/>
70+
PREVIOUS="enlargepass" NEXT="creationtime"/>
7171
<FIELD NAME="creationtime" TYPE="int" LENGTH="20" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false"
7272
PREVIOUS="labmanager" NEXT="expirationtime"/>
7373
<FIELD NAME="expirationtime" TYPE="int" LENGTH="20" NOTNULL="true" UNSIGNED="true" SEQUENCE="false"

db/tasks.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
$tasks = array(
3232
array(
33-
'classname' => 'block_remlab_manager\task\delete_sarlab_keys',
33+
'classname' => 'block_remlab_manager\task\delete_enlarge_keys',
3434
'blocking' => 0,
3535
'minute' => '00',
3636
'hour' => '23',
@@ -57,7 +57,7 @@
5757
'month' => '*'
5858
),
5959
array(
60-
'classname' => 'block_remlab_manager\task\synchronise_sarlab_users',
60+
'classname' => 'block_remlab_manager\task\synchronise_myfrontier_users',
6161
'blocking' => 0,
6262
'minute' => '*/30',
6363
'hour' => '*',

db/upgrade.php

+12
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,17 @@ function xmldb_block_remlab_manager_upgrade($oldversion) {
123123
$dbman->add_field($table, $field);
124124
}
125125

126+
if ($oldversion < '2019110400') {
127+
// Rename sarlab to enlarge
128+
$dbman = $DB->get_manager();
129+
$table = new xmldb_table('block_remlab_manager_sb_keys');
130+
if ($dbman->table_exists($table)) {
131+
$field = new xmldb_field('labmanager', XMLDB_TYPE_INTEGER, '1', null,
132+
XMLDB_NOTNULL, null, '0', 'sarlabpass', 'creationtime');
133+
$dbman->rename_field($table, $field, 'enlargepass');
134+
$dbman->rename_table($table, 'block_remlab_manager_eg_keys');
135+
}
136+
}
137+
126138
return true;
127139
}

edit_form.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ protected function specific_definition($mform) {
3434
if (get_capability_info('ltisource/enlarge:createexp')) {
3535
if (has_capability('ltisource/enlarge:createexp', context_system::instance(), $USER->id, false)) {
3636
// Section header title according to language file.
37-
$mform->addElement('header', 'sarlab_header', get_string('sarlab_header', 'block_remlab_manager'));
37+
$mform->addElement('header', 'enlarge_header', get_string('enlarge_header', 'block_remlab_manager'));
3838

3939
// Indicate the LTI activity that connects to ENLARGE.
40-
$mform->addElement('text', 'config_sarlab_lti_url', get_string('sarlab_lti_url', 'block_remlab_manager'));
41-
$mform->setType('config_sarlab_lti_url', PARAM_TEXT);
40+
$mform->addElement('text', 'config_enlarge_lti_url', get_string('enlarge_lti_url', 'block_remlab_manager'));
41+
$mform->setType('config_enlarge_lti_url', PARAM_TEXT);
4242
}
4343
}
4444
}

lang/en/block_remlab_manager.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040

4141
// Strings in settings.php.
4242
$string['default_communication_set'] = "Communication settings. (Only important if you are also using ENLARGE)";
43-
$string['enlarge_IP'] = "Name and IP address of the ENLARGE server(s)";
44-
$string['enlarge_IP_description'] = "If you are using ENLARGE (a system that manages connections to remote laboratories resources), you need to provide the IP address of the server that runs the ENLARGE system you want to use. Otherwise, this value will not be used, so you can leave the default value. If you have more than one ENLARGE server (for example, one at 127.0.0.1 and a second one at 127.0.0.2), insert the IP addresses separated by semicolons: 127.0.0.1;127.0.0.2. Additionally, you can provide a name in order to identify each ENLARGE server: 'ENLARGE Madrid'127.0.0.1;'ENLARGE Huelva'127.0.0.2";
45-
$string['enlarge_port'] = "ENLARGE communication port(s)";
46-
$string['enlarge_port_description'] = "If you are using ENLARGE (a system that manages connections to remote laboratories resources), you need to provide a valid port for establishing the communications with the ENLARGE server. Otherwise, this value will not be used, so you can leave the default value. If you have more than one ENLARGE server (for example, one using port 443 and a second one also using port 443), insert the values separated by semicolons: 443;443";
43+
$string['myFrontier_IP'] = "Name and IP address of the ENLARGE server(s)";
44+
$string['myFrontier_IP_description'] = "If you are using ENLARGE (a system that manages connections to remote laboratories resources), you need to provide the IP address of the server that runs the ENLARGE system you want to use. Otherwise, this value will not be used, so you can leave the default value. If you have more than one ENLARGE server (for example, one at 127.0.0.1 and a second one at 127.0.0.2), insert the IP addresses separated by semicolons: 127.0.0.1;127.0.0.2. Additionally, you can provide a name in order to identify each ENLARGE server: 'ENLARGE Madrid'127.0.0.1;'ENLARGE Huelva'127.0.0.2";
45+
$string['myFrontier_port'] = "ENLARGE communication port(s)";
46+
$string['myFrontier_port_description'] = "If you are using ENLARGE (a system that manages connections to remote laboratories resources), you need to provide a valid port for establishing the communications with the ENLARGE server. Otherwise, this value will not be used, so you can leave the default value. If you have more than one ENLARGE server (for example, one using port 443 and a second one also using port 443), insert the values separated by semicolons: 443;443";
4747

4848
// Strings in edit_form.php.
4949
$string['enlarge_header'] = 'Configure ENLARGE for this block instance';

lang/es/block_remlab_manager.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040

4141
// Strings in settings.php.
4242
$string['default_communication_set'] = "Opciones de comunicaci&oacute;n. (Importante s&oacute;lo si tambi&eacute;n usa ENLARGE)";
43-
$string['enlarge_IP'] = "Nombre y direcci&oacute;n IP del servidor ENLARGE";
44-
$string['enlarge_IP_description'] = "Si usa ENLARGE (un sistema que gestiona las conexiones a recursos de laboratorios remotos), debe proporcionar la direcci&oacute;n IP del servidor que ejecuta el sistema ENLARGE que desea utilizar. En caso contrario, esta variable no se usa, de modo que puede dejar el valor por defecto. Si tiene m&aacute;s de un servidor ENLARGE (por ejemplo, uno en 127.0.0.1 y otro en 127.0.0.2), inserte las direcciones IP separadas por puntos y comas: 127.0.0.1;127.0.0.2. Adem&aacute;s, puede proporcionar un nombre para identificar cada servidor ENLARGE: 'ENLARGE Madrid'127.0.0.1;'ENLARGE Huelva'127.0.0.2";
45-
$string['enlarge_port'] = "Puerto(s) de comunicaci&oacute;n con ENLARGE";
46-
$string['enlarge_port_description'] = "Si usa ENLARGE (un sistema que gestiona las conexiones a recursos de laboratorios remotos), debe proporcionar un puerto v&aacute;lido para establecer las comunicaciones necesarias con el servidor de ENLARGE. En caso contrario, esta variable no se usa, de modo que puede dejar el valor por defecto. Si tiene m&aacute;s de un servidor ENLARGE (por ejemplo, uno usando el puerto 443 y un segundo usando tambi&eacute;n el puerto 443), inserte los valores separados por puntos y comas: 443;443";
43+
$string['myFrontier_IP'] = "Nombre y direcci&oacute;n IP del servidor ENLARGE";
44+
$string['myFrontier_IP_description'] = "Si usa ENLARGE (un sistema que gestiona las conexiones a recursos de laboratorios remotos), debe proporcionar la direcci&oacute;n IP del servidor que ejecuta el sistema ENLARGE que desea utilizar. En caso contrario, esta variable no se usa, de modo que puede dejar el valor por defecto. Si tiene m&aacute;s de un servidor ENLARGE (por ejemplo, uno en 127.0.0.1 y otro en 127.0.0.2), inserte las direcciones IP separadas por puntos y comas: 127.0.0.1;127.0.0.2. Adem&aacute;s, puede proporcionar un nombre para identificar cada servidor ENLARGE: 'ENLARGE Madrid'127.0.0.1;'ENLARGE Huelva'127.0.0.2";
45+
$string['myFrontier_port'] = "Puerto(s) de comunicaci&oacute;n con ENLARGE";
46+
$string['myFrontier_port_description'] = "Si usa ENLARGE (un sistema que gestiona las conexiones a recursos de laboratorios remotos), debe proporcionar un puerto v&aacute;lido para establecer las comunicaciones necesarias con el servidor de ENLARGE. En caso contrario, esta variable no se usa, de modo que puede dejar el valor por defecto. Si tiene m&aacute;s de un servidor ENLARGE (por ejemplo, uno usando el puerto 443 y un segundo usando tambi&eacute;n el puerto 443), inserte los valores separados por puntos y comas: 443;443";
4747

4848
// Strings in edit_form.php.
4949
$string['enlarge_header'] = 'Configurar ENLARGE para esta instancia del bloque';

simplehtml_form.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ public function definition() {
108108
$mform->setDefault('initialpracticeintro', $remlab->practiceintro);
109109
$mform->setDefault('ip', $remlab->ip);
110110
$mform->setDefault('port', $remlab->port);
111-
$sarlabinstance = is_practice_in_enlarge($remlab->practiceintro);
112-
if ($sarlabinstance !== false) {
111+
$enlargeinstance = is_practice_in_enlarge($remlab->practiceintro);
112+
if ($enlargeinstance !== false) {
113113
$mform->freeze(array('practiceintro', 'ip', 'port'));
114114
}
115115
} else {

version.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
defined('MOODLE_INTERNAL') || die();
3232

33-
$plugin->version = 2019080901;
33+
$plugin->version = 2019110401;
3434
$plugin->requires = 2013111800;
3535
$plugin->cron = 0;
3636
$plugin->component = 'block_remlab_manager'; // To check on upgrade, that module sits in correct place.
3737
$plugin->maturity = MATURITY_STABLE;
38-
$plugin->release = '1.2 (Build: 2019080901)';
39-
$plugin->dependencies = array('mod_ejsapp' => 2018071000);
38+
$plugin->release = '1.2 (Build: 2019110401)';
39+
$plugin->dependencies = array('mod_ejsapp' => 2019110400);

0 commit comments

Comments
 (0)