Skip to content

Commit

Permalink
Merge pull request #9 from emeneo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Flottertotte committed Jul 20, 2014
2 parents 601c337 + 38af798 commit ef8736a
Show file tree
Hide file tree
Showing 12 changed files with 158 additions and 295 deletions.
22 changes: 0 additions & 22 deletions .gitattributes

This file was deleted.

215 changes: 0 additions & 215 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,215 +0,0 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg
17 changes: 5 additions & 12 deletions edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,17 @@
if ($instance->id) {
$instance->status = $data->status;
$instance->name = $data->name;
$instance->password = $data->password;
$instance->customint1 = $data->customint1;
$instance->customint2 = $data->customint2;
$instance->customint3 = $data->customint3;
$instance->customint4 = $data->customint4;
$instance->customtext1 = $data->customtext1;
$instance->roleid = $data->roleid;
$instance->enrolperiod = $data->enrolperiod;
$instance->enrolstartdate = $data->enrolstartdate;
$instance->enrolenddate = $data->enrolenddate;
$instance->timemodified = time();
$DB->update_record('enrol', $instance);

} else {
// $fields = array('status'=>$data->status, 'name'=>$data->name, 'password'=>$data->password, 'customint1'=>$data->customint1, 'customint2'=>$data->customint2,
// 'customint3'=>$data->customint3, 'customint4'=>$data->customint4, 'customtext1'=>$data->customtext1,
// 'roleid'=>$data->roleid, 'enrolperiod'=>$data->enrolperiod, 'enrolstartdate'=>$data->enrolstartdate, 'enrolenddate'=>$data->enrolenddate);
$fields = array('status'=>$data->status, 'name'=>$data->name, 'customtext1'=>$data->customtext1);
$fields = array(
'status' =>$data->status,
'name' =>$data->name,
'roleid' =>$data->roleid,
'customtext1' =>$data->customtext1);
$plugin->add_instance($course, $fields);
}

Expand Down
12 changes: 12 additions & 0 deletions edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,21 @@ function definition() {

$mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
$mform->setType('name', PARAM_TEXT);

$options = array(ENROL_INSTANCE_ENABLED => get_string('yes'),
ENROL_INSTANCE_DISABLED => get_string('no'));
$mform->addElement('select', 'status', get_string('status', 'enrol_apply'), $options);
$mform->addHelpButton('status', 'status', 'enrol_apply');
$mform->setDefault('status', $plugin->get_config('status'));

if ($instance->id) {
$roles = get_default_enrol_roles($context, $instance->roleid);
} else {
$roles = get_default_enrol_roles($context, $plugin->get_config('roleid'));
}
$mform->addElement('select', 'roleid', get_string('defaultrole', 'role'), $roles);
$mform->setDefault('roleid', $plugin->get_config('roleid'));

$mform->addElement('textarea', 'customtext1', get_string('editdescription', 'enrol_apply'));


Expand Down
51 changes: 51 additions & 0 deletions lang/ca/enrol_apply.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* *************************************************************************
* * Apply Enrol **
* *************************************************************************
* @copyright emeneo.com **
* @link emeneo.com **
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later **
* *************************************************************************
* ************************************************************************
*/
// The name of your plugin. Displayed on admin menus.
$string['enrolname'] = 'Inscripció prèvia aprovació';
$string['pluginname'] = 'Inscripció prèvia aprovació';
$string['pluginname_desc'] = 'With this plugin users can apply to a course and a teacher have to comfirm before the user gets enroled.';

$string['confirmmailsubject'] = 'Assumpte del correu de confirmació';
$string['confirmmailcontent'] = 'Contingut del correu de confirmació';
$string['cancelmailsubject'] = 'Assumpte del correu de cancel·lació';
$string['cancelmailcontent'] = 'Contingut del correu de cancel·lació';
$string['confirmmailcontent_desc'] = 'Sisplau, utilitza marques especials que se substituiran en el contingut del correu.<br>{firstname}:Nom registrat per l\'usuari; {content}:Nom del curs';
$string['cancelmailcontent_desc'] = 'Sisplau, utilitza marques especials que se substituiran en el contingut del correu.<br>{firstname}:Nom registrat per l\'usuari; {content}:Nom del curs';

$string['confirmusers'] = 'Confirmar inscripcions';

$string['coursename'] = 'Curs';
$string['applyuser'] = 'Nom / Cognom';
$string['applyusermail'] = 'Correu electrònic';
$string['applydate'] = 'Data d\'inscripció';
$string['btnconfirm'] = 'Confirmar';
$string['btncancel'] = 'Cancel·lar';
$string['enrolusers'] = 'Inscriure usuaris';

$string['status'] = 'Permet inscripció prèvia aprovació';
$string['confirmenrol'] = 'Gestionar sol·licituds';

$string['apply:config'] = 'Configurar instàncies d\'Inscripció prèvia aprovació'; // Needs more insight
$string['apply:manage'] = 'Gestionar la Inscripció prèvia aprovació'; // Needs more insight
$string['apply:unenrol'] = 'Cancel·lar usuaris del curs'; // Needs more insight
$string['apply:unenrolapply'] = 'Cancel·lar-se a si mateix del curs'; // Needs more insight. Very ugly translation!

$string['notification'] = '<b>Sol·licitud d\'inscripció enviada correctament</b>. <br/><br/>Rebràs una notificació per correu electrònic un cop estigui confirmada la inscripció.';

$string['sendmailtoteacher'] = 'Enviar notificacions per correu als professors';
$string['mailtoteacher_suject'] = 'Nova inscripció al curs!';
$string['editdescription'] = 'Descripció de l\'àrea de text';
$string['applymanage'] = 'Gestionar inscripcions';

$string['status_desc'] = 'Allow course access of internally enrolled users.';

?>
Loading

0 comments on commit ef8736a

Please sign in to comment.