}
//出提关键词
else if(strstr($keyword, \出题\ {
$content= '请回复”出题+题号+客观题答案“进行出题,示例:出题+1+A'; }
//获取答题情况的接口
else if(strstr($keyword, \答题情况+\ {
$openid = $object->FromUserName;
$content= questioncondition( $openid ,$keyword); }
else if(strstr($keyword, \答题情况\ {
$content= '请回复”答题情况+题号“进行出题,示例:答题情况+1'; }
27
}
//查看作业的关键词接口 else if(strstr($keyword, \作业\ {
$content= viewwork( ); }
//教师进行出题的接口
else if(strstr($keyword, \出题+\ {
$openid = $object->FromUserName; $content= addquestion( $openid ,$keyword);
基于微信的辅助教学系统的设计与实现
else{
$to = $object->FromUserName;
基于微信的辅助教学系统的设计与实现
$content = \未定义关键词!\ }
if(is_array($content)){//调用处理信息回复
$result = $this->transmitText($object, $content);//回复文本形式的消息 }else{
}
return $result; }
//接收链接消息
private function receiveLink($object) {
$content = \下面是此链接的标题:\;链接中的内容是\;你发送的链接的地址是:\
$result = $this->transmitText($object, $content);//以文本形式回复 return $result; }
//回复文本消息
private function transmitText($object, $content) {
$xmlTpl = \
$result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time(), $content);//打印回复消息
return $result; }
$result = $this->transmitText($object, $content);//回复文本形式的消息
28
基于微信的辅助教学系统的设计与实现
4.3.6 关键词帮助
定义了一个网页实现了关键词查询帮助:
31
-moz-border-radius-bottomright:5px;
-webkit-border-bottom-right-radius:5px; /* Saf3-4 */ -moz-border-radius-bottomleft:5px;
-webkit-border-bottom-left-radius:5px; /* Saf3-4 */ -moz-border-radius-topright:5px;
-webkit-border-top-right-radius:5px; /* Saf3-4 */ -moz-border-radius-topleft:5px;
-webkit-border-top-left-radius:5px; /* Saf3-4 */
background: -moz-linear-gradient(100% 20% 90deg, #e8eaeb, #ededed);
background: -webkit-gradient(linear, 0% 0%, 0% 20%, from(#ededed), to(#e8eaeb)); background: -moz-linear-gradient(100% 25% 90deg, #f6f6f6, #f1f1f1);
background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f1f1f1), to(#f6f6f6));
基于微信的辅助教学系统的设计与实现
background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);//设置大小及值
background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));//设置大小及值