Find Jobs
Hire Freelancers

Add some PHP code to check for max enrollment in Moodle

$30-250 USD

Selesai
Disiarkan lebih dari 10 tahun yang lalu

$30-250 USD

Dibayar semasa penghantaran
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 Projek: 5274353

Tentang projek

9 cadangan
Projek jarak jauh
Aktif 10 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
Dianugerahkan kepada:
Avatar Pengguna
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 dalam 3 hari
5.0 (23 ulasan)
4.4
4.4
9 pekerja bebas membida secara purata $155 USD untuk pekerjaan ini
Avatar Pengguna
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 dalam 3 hari
4.9 (288 ulasan)
7.4
7.4
Avatar Pengguna
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 dalam 3 hari
5.0 (61 ulasan)
5.4
5.4
Avatar Pengguna
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 dalam 3 hari
5.0 (11 ulasan)
4.3
4.3
Avatar Pengguna
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 dalam 3 hari
5.0 (7 ulasan)
2.9
2.9
Avatar Pengguna
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 dalam 2 hari
5.0 (2 ulasan)
1.7
1.7
Avatar Pengguna
A proposal has not yet been provided
$288 USD dalam 30 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
A proposal has not yet been provided
$277 USD dalam 3 hari
0.0 (0 ulasan)
0.0
0.0

Tentang klien

Bendera UNITED STATES
Detroit, United States
5.0
1
Kaedah pembayaran disahkan
Ahli sejak Dis 31, 2013

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.