Find Jobs
Hire Freelancers

Add some PHP code to check for max enrollment in Moodle

$30-250 USD

Concluído
Publicado há mais de 10 anos

$30-250 USD

Pago na entrega
I am looking to modify the enrol_paypal plugin to offer a way to limit the number of students per course that can enroll that way. I have figured out a short way to do it, but am not good enough in PHP to make it work. From [login to view URL] in the enrol_paypal folder: function enrol_page_hook(stdClass $instance) { global $CFG, $USER, $OUTPUT, $PAGE, $DB; ob_start(); if ($DB->record_exists('user_enrolments', array('userid'=>$USER->id, 'enrolid'=>$instance->id))) { return ob_get_clean(); } if ($instance->enrolstartdate != 0 && $instance->enrolstartdate > time()) { return ob_get_clean(); } if ($instance->enrolenddate != 0 && $instance->enrolenddate < time()) { return ob_get_clean(); } $course = $DB->get_record('course', array('id'=>$instance->courseid)); $context = context_course::instance($course->id); $shortname = format_string($course->shortname, true, array('context' => $context)); $strloginto = get_string("loginto", "", $shortname); $strcourses = get_string("courses"); // Pass $view=true to filter hidden caps if the user cannot see them if ($users = get_users_by_capability($context, 'moodle/course:update', 'u.*', '[login to view URL] ASC', '', '', '', '', false, true)) { $users = sort_by_roleassignment_authority($users, $context); $teacher = array_shift($users); } else { $teacher = false; } if ( (float) $instance->cost <= 0 ) { $cost = (float) $this->get_config('cost'); } else { $cost = (float) $instance->cost; } if (abs($cost) < 0.01) { // no cost, other enrolment methods (instances) should be used echo '<p>'.get_string('nocost', 'enrol_paypal').'</p>'; } else { /*REQUESTED FUNCTIONALITY: This is where we can put the check for maximum enrolled students: If ((count(userid) from mdl_enrol_paypal where payment_status = 'Completed' and courseid = $instance->courseid) > 75) {print "Course is full.";} else{*/ // Calculate localised and "." cost, make sure we send PayPal the same value, // please note PayPal expects amount with 2 decimal places and "." separator. $localisedcost = format_float($cost, 2, true); $cost = format_float($cost, 2, false); ... I do not need this to appear in any settings page right away, but may want to add that functionality later.
ID do Projeto: 5274353

Sobre o projeto

9 propostas
Projeto remoto
Ativo há 10 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
Hi sir,I have read you requirement and interested to add the maximum limit code into the plugin so let me know with positive [login to view URL]
$111 USD em 3 dias
5,0 (23 avaliações)
4,4
4,4
9 freelancers estão ofertando em média $155 USD for esse trabalho
Avatar do Usuário
10+ years of experiance in programming PHP/MYSQl. I had done much programming into development and also bug fixing all these years. You can check my profile for my reputation and ranking . I can work on this project and finish it like you need. are you sure only on this file the code needs to be changed and it will work for number of students?
$147 USD em 3 dias
4,9 (288 avaliações)
7,4
7,4
Avatar do Usuário
Dear sir, I have gone through your outsourced requirement "Add some PHP code to check for max enrollment in Moodle" and have analyzed that I have right credentials (Moodle, PHP, Software Architecture) to execute your esteemed project. You will never go wrong choosing me :)
$184 USD em 3 dias
5,0 (61 avaliações)
5,4
5,4
Avatar do Usuário
Dear Sir, I'm expert PHP Open Source developer. I have done a lot of projects which are based on Open Source Technologies. I can complete your task very quickly. Let me know if you are interested. I'm sure you'll inspire with my work strategies. I'm expert in Open Source Technologies, Mobile Development, Website Designing, Graphic Designing etc . Looking forward to your quick response! Thanks Ssplancer
$88 USD em 3 dias
5,0 (11 avaliações)
4,3
4,3
Avatar do Usuário
www.freelancer.com/u/shrinkray.html . I am sure all of other bidders are project manager or sales person so they are not capable to give you reasonable estimate. I am an individual and professional developer who is holding always 100% completion rate . check my profile and portfolio. I want to discuss more about your project , so please give me your sky pe username or add me in sk ype : nowatch911
$150 USD em 3 dias
5,0 (7 avaliações)
2,9
2,9
Avatar do Usuário
respected sir i have an experience in html,html5,css,css3,php,javascript,jquery,ajax,kohana,prestashop,codeigniter,moodle,joomla,wordpress,drupal,sugarCRM,cpanel,server migration,webservice and mysql.i am ready to do your project. I have an experience in moodle customization. I have an experience in third party integration like paypal,eway,webpay payment gateway API,also know about twitter,tumblr,facebook API. I can customize enrollment plugin as per your requirement. you can contact me on skype:harshilshah1310
$100 USD em 2 dias
5,0 (2 avaliações)
1,7
1,7
Avatar do Usuário
A proposal has not yet been provided
$288 USD em 30 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
A proposal has not yet been provided
$277 USD em 3 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
Detroit, United States
5,0
1
Método de pagamento verificado
Membro desde dez. 31, 2013

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.