如何设置在线课程注册以在满足最高学生限制时关闭? [英] How can I set up online class registrations to shut down when the max student limit is met?

查看:97
本文介绍了如何设置在线课程注册以在满足最高学生限制时关闭?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想帮助我的公司让我们的网站更有效。我们目前提供的课程,人们可以在线注册并通过Paypal支付。班级规模最大为16或12。目前,我们的网站将继续允许学生注册课程(通过Paypal提交付款),即使已达到学生最高限额。



例如:电子邮件确认已提交给我们的工作电子邮件,Abby已经支付了课程费用。她是16岁的学生。 10分钟后,来自Joe的电子邮件确认进入我们同一课程的工作电子邮件中。他是17岁的学生。我们不能接受他进入我们班级,因为我们班上只能有16个人。



我们使用WordPress,我们一直在监控正在进行注册的每个班级,因此,当他们达到他们的最大值,16或12时,我们进入WordPress并手动点击售罄以便它出现在我们的网站上 - 这样人们就可以看到该课程已售罄。


有没有办法我们可以设置我们的网站,以便在满足最高学生限制(16或12)时自动在课程上发布售完标志?



非常感谢!!



Sarah

Hi,

I want to help my company make our website more effective. We currently offer classes that people can register for online and pay through Paypal. Class sizes are either 16 or 12 max. Currently, our website will continue to allow students to register for classes (submit their payments through Paypal) even if the maximum student limit has been met.

Ex: An email confirmation has been submitted to our work email that "Abby" has paid for a class. She is student #16. 10 minutes later, an email confirmation from "Joe" comes into our work email for the same class. He is student #17. We can't accept him into our class because we can only have 16 people in the class.

We use WordPress, and we have been monitoring every classes ongoing registrations, so that when they reach their max, 16 or 12, we go into WordPress and manually click on "Sold Out" so that it appears on our website -- so that people can see that the class is sold out.

Is there a way we can set up our website to automatically post the "Sold Out" sign over classes when their max student limit (16 or 12) is met?

Thanks so much!!

Sarah

推荐答案

使用 add_option('max_class_size',12)向数据库添加新选项;



然后,编辑你的代码并获得已注册用户的数量,就像电子邮件获得no一样,做类似的事情



Add a new option to the database using add_option( 'max_class_size', 12 );

Then, edit your code and get the number of already registered users, the same way the emails get the no, and do something like

if ( 


no_of_users > = get_option(' max_class_size')){
// 告诉用户我们已售罄
}
else
{
// 注册用户的程序。
}
no_of_users >= get_option( 'max_class_size' ) ){ //Tell the user we are sold out } else { //Procedure to register user. }


这篇关于如何设置在线课程注册以在满足最高学生限制时关闭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆