logo
down
shadow

How can i add custom fields in moodle assignment plugin?


How can i add custom fields in moodle assignment plugin?

By : suhitha
Date : November 28 2020, 11:01 PM
it helps some times You will need to create a custom assignment submission plugin https://docs.moodle.org/dev/Assign_submission_plugins (or find an existing plugin that does what you want - https://moodle.org/plugins/browse.php?list=category&id=42 ).
code :


Share : facebook icon twitter icon
Adding custom CSS into a new Moodle assignment

Adding custom CSS into a new Moodle assignment


By : user1739162
Date : March 29 2020, 07:55 AM
should help you out just add a file called styles.php into the Module's folder. the file should output CSS code when it is parsed.
Moodle goes into each Module's folder and looks for that file, when the page's CSS layout is constructed.
code :
$THEME->modsheets = true;

/// When this is enabled, then this theme will search for
/// files named "styles.php" inside all Activity modules and
/// include them.   This allows modules to provide some basic
/// layouts so they work out of the box.
/// It is HIGHLY recommended to leave this enabled.
/* simple CSS code */ 
.left { float:left; }

/* php that generate CSS code */
< ?php if ( right_to_left() ) {echo ".right:text-align:left;"} 
else {echo ".right:text-align:right;"} ?>
Additional fields in Moodle custom auth method plugin

Additional fields in Moodle custom auth method plugin


By : Keihell
Date : March 29 2020, 07:55 AM
around this issue I have a custom authentication method plugin, I have added a custom form. The plugin works fine, but I need to add another field to the form and get the submitted value in the user_login function , I wouldn't use $_POST directly try
code :
$fieldname = optional_param('field_name', null, PARAM_XXX);
$fieldname = required_param('field_name', PARAM_XXX);
How to validate custom fields in moodle

How to validate custom fields in moodle


By : Sandra Alvarez-Betan
Date : March 29 2020, 07:55 AM
I wish did fix the issue. Maybe something like this after profile_signup_fields($mform); in signup_form.php
code :
$form->addRule('profile_field_shortname',
    get_string('regexerrormessage', 'pluginname'), 'regex', 'regexexpression');
SQL Moodle using custom profile fields

SQL Moodle using custom profile fields


By : cicakchanson
Date : March 29 2020, 07:55 AM
I wish this helpful for you I have created 2 user profile fields Employee ID (shortname:employeeid) Organisation (shortname:Organisation) , You may have more success with the following:
code :
SELECT 
    employee.data AS 'Employee No.',
CONCAT(u.firstname,' ',u.lastname) AS 'Full Name',
CONCAT('<a target="_new" href="%%WWWROOT%%/user/profile.php?id=',u.id,'">', u.username,'</a>') AS 'User Name',
    org.data AS 'Organisation',
c.fullname AS 'Course',
DATE_FORMAT(FROM_UNIXTIME(p.timeenrolled),'%m/%d/%Y') AS 'Enrollment Date',
DATE_FORMAT(FROM_UNIXTIME(p.timecompleted),'%m/%d/%Y') AS 'Completion Date',
DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(p.timecompleted),INTERVAL 1 YEAR), '%m/%d/%Y') AS 'Expiration Date' 

FROM prefix_course_completions p
JOIN prefix_cours c ON p.course = c.id
JOIN prefix_user u ON p.userid = u.id
LEFT JOIN (
   SELECT d.userid, d.data
     FROM prefix_user_info_data d
     JOIN prefix_user_info_field f ON f.id = d.fieldid AND f.shortname = 'employeeid'
) employee ON employee.userid = u.id
LEFT JOIN (
   SELECT d.userid, d.data
     FROM prefix_user_info_data d
     JOIN prefix_user_info_field f ON f.id = d.fieldid AND f.shortname = 'Organisation'
) org ON org.userid = u.id

WHERE 1=1

%%FILTER_COURSES:Course%%
%%FILTER_USERS:employee.data%%
%%FILTER_SEARCHTEXT:org.data:~%%
Need help debugging a custom authentication plugin for Moodle

Need help debugging a custom authentication plugin for Moodle


By : user3818569
Date : March 29 2020, 07:55 AM
I wish this helpful for you Can you confirm the order that the authentication pluggins are displayed? This will determine the order in which they are used. See..
http://docs.moodle.org/en/Manage_authentication
Related Posts Related Posts :
  • Connect SendObserver to ISendEndpoint obtained by consume context once
  • Constructing Hetereogenous Type Lists in Rust
  • Batch rename with command line
  • How do I get the elastic load balancer dns name?
  • How to get the path where the library is installed
  • ZF2 ACL check link in view
  • iTunes Connect Screenshot 5"5 format
  • Retrieving data feed from a closed Facebook group
  • Spring (Boot) application and csrf
  • Argon.js: Error: A frame state has not yet been received
  • Uncaught exception: -[AccessibilitySettingsController setAXInspectorEnabled:specifier:]: unrecognized selector sent to i
  • Nancy register dependency with type argument
  • How to set string date in store to date textbox inside a dojo grid
  • clEnqueueNDRangeKernel' failed with error 'out of resources'
  • JavaFX : TableView inside Dialog has duplicate items
  • How to make synchronous url requests with swift 3
  • how to access source code of PolSARpro
  • ABAC with keycloak - Using Resource attributes in policy
  • backpack-for-laravel Error install backpack for Laravel 5.3
  • Show executed query in Microsoft SQL Server 2016
  • How to integrate Grunt with project from eclipse.
  • How to sort items from shortest to longest
  • Dapper control dates
  • The module "APT50.dll" failed to load
  • Kentico ASCX transformation page type properties
  • The expression you entered contains invalid syntax
  • Android N showing warning alert in Zbar .SO File
  • CPU usage too high while running Ruta Script
  • UITableView load ONCE all cells in background
  • pygame: how to display full-screen without cutting off edges
  • Changing Kademlia Metric - Unidirectional Property Importance
  • Yii2 redirect 404 Page not found
  • How can I emit more values after emit an error?
  • How can I integrate my Bot (created with the Bot Framework) with Spark?
  • Install4j silent updater process hangs in case of incorrect proxy settings
  • How to force view controller orientation in iOS 10?
  • sbt dependsOn, typesafe config merges application.conf
  • Global optimization of polynomial in several variables in Maple?
  • Is there a way to monitor a SQL Server service with ZABBIX?
  • Can't install cygnus-ngsi via Docker
  • API time zone representation
  • Animation of SVG doesnt work
  • How to define and invoke inline a lambda expression in Java
  • Wit.ai - When are the actions triggered?
  • TIBCO SPOTFIRE Time on y-axis (avg duration)
  • Google PubSub Emulator: How to configure logging level
  • Run script in relative path via System.cmd in elixir
  • WSO2 Identity Server: SLO redirect not working as expected
  • Windows Mobil Apps Store Define Install and Uninstall
  • Not able to detect Kurento Media Server crash
  • Flow control in pushtechnology diffusion server delaying publishing client updates
  • Geolocalization user search: Twitter API
  • Changing the filter header in Kibana?
  • Valgrind suppression and return code
  • How can I get female voice by Web Speech API in Google Chrome
  • Strategy for quick icon generation for labview?
  • STM32 internal clocks
  • OrientDB callback after record is persisted in server
  • Position of scaling points
  • Limit nested objects results in rethinkdb query
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com