-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
3.8
Search and return badges matching the parameters.
Parameters:
|
----------list of (
|
object {
|
key string //the badge column to search, expected keys (value format) are:
|
"id" (int) matching badge id,
|
"name" (string) badge name (Note: you can use % for searching but it may be considerably slower!),
|
"expiredate" (int/timestamp) fixed date when the badge expires
|
"expireperiod" (int/timestamp) relative time when the badge expire, after badge was issued
|
"type" (int) 1 = site badge, 2 = course badge
|
"courseid" (int) only if "type" = 2, course where the badge is related to
|
"status" (int) 0 = inactive, 1 = active, 2 = inactive locked, 3 = active locked, 4 = archived
|
"version" (string) badge version
|
value string //the value to search
|
}
|
)Return value:
|
-----------object {
|
badges list of (
|
object {
|
id int //ID of the badge
|
name string //Name of the badge
|
description string //Description of the badge
|
timecreated int //Timestamp the badge was created
|
timemodified int //Timestamp the badge was last modified
|
usercreated int //ID of the user who created the badge
|
usermodified int //ID of the user who last modified the badge
|
issuername string //Name of the issuer of the badge
|
issuerurl string //Issuer URL, e.g. homepage
|
issuercontact string Optional //Contact information of the issuer
|
expiredate int Optional //Fixed date when the badge will expire (timestamp)
|
expireperiod int Optional //Relative date when the badge will expire, after the badge was issued (timestamp)
|
type int //Type of the badge (1 = site badge, 2 = course badge)
|
courseid int Optional //The course where the badge relates to, only if type = 2
|
message string //Text of the message the user receives when the badge is issued
|
messagesubject string //Subject of the message the user receives when the badge is issued
|
attachement int Optional //Whether to attach badge to message
|
notification int Optional //Whether to notify issuer when badge is awarded
|
status int //Status of the badge (0 = inactive, 1 = active, 2 = inactive locked, 3 = active locked, 4 = archived)
|
nextcron int //Next cron
|
version string Optional //Version of the badge
|
language string //Language of the badge
|
imageauthorname string Optional //Name of the image author
|
imageauthoremail string Optional //Email of the image author
|
imageauthorurl string Optional //URL of the image author
|
imagecaption string Optional //Caption of the image
|
}
|
)warnings Optional //list of warnings
|
list of (
|
//warning
|
object {
|
item string Optional //always set to 'key'
|
itemid int Optional //faulty key name
|
warningcode string //the warning code can be used by the client app to implement specific behaviour
|
message string //untranslated english message to explain the warning
|
}
|
)}
|
- has been marked as being related by
-
MDL-29934 Web service API Roadmap
- Closed